From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752589AbdK2WBe (ORCPT ); Wed, 29 Nov 2017 17:01:34 -0500 Received: from mail-ot0-f180.google.com ([74.125.82.180]:44464 "EHLO mail-ot0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751958AbdK2WBc (ORCPT ); Wed, 29 Nov 2017 17:01:32 -0500 X-Google-Smtp-Source: AGs4zMZRSXPeK6c7jfUp/W8/T3acdmmaBSg3qBf8it0MJ+0PAxulg+5BTG69Uyc4rIhgYBLqn+UfJoN/HrDzb/+k77w= MIME-Version: 1.0 In-Reply-To: References: From: Brandon Carpenter Date: Wed, 29 Nov 2017 14:01:11 -0800 Message-ID: Subject: Re: Sending 802.1Q packets using AF_PACKET socket on filtered bridge forwards with wrong MAC addresses To: Stephen Hemminger Cc: "David S. Miller" , bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I narrowed the search to a memmove() called from skb_reorder_vlan_header() in net/core/skbuff.c. > memmove(skb->data - ETH_HLEN, skb->data - skb->mac_len - VLAN_HLEN, > 2 * ETH_ALEN); Calling skb_reset_mac_len() after skb_reset_mac_header() before calling br_allowed_ingress() in net/bridge/br_device.c fixes the problem. diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index af5b8c87f590..e10131e2f68f 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -58,6 +58,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) BR_INPUT_SKB_CB(skb)->brdev = dev; skb_reset_mac_header(skb); + skb_reset_mac_len(skb); eth = eth_hdr(skb); skb_pull(skb, ETH_HLEN); I'll put together an official patch and submit it. Should I use another email account? Are my emails being ignored because of that stupid disclaimer my employer attaches to my messages (outside my control)? Brandon -- CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain proprietary, confidential or privileged information or otherwise be protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender and destroy all copies and the original message.