From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chonggang Li Subject: [PATCH net-next v2] bonding: deliver link-local packets with skb->dev set to link that packets arrived on Date: Sun, 16 Apr 2017 12:02:18 -0700 Message-ID: <20170416190218.57224-1-chonggangli@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: netdev@vger.kernel.org, Chonggang Li , Mahesh Bandewar , =?UTF-8?q?Maciej=20=C5=BBenczykowski?= To: j.vosburgh@gmail.com, andy@greyhouse.net, vfalico@gmail.com, nikolay@redhat.com, edumazet@google.com, davem@davemloft.net Return-path: Received: from mail-pf0-f174.google.com ([209.85.192.174]:36372 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756597AbdDPTDb (ORCPT ); Sun, 16 Apr 2017 15:03:31 -0400 Received: by mail-pf0-f174.google.com with SMTP id 194so18217901pfv.3 for ; Sun, 16 Apr 2017 12:03:31 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: Bonding driver changes the skb->dev to the bonding-master before passing the packet to stack for further processing. This, however does not make sense for the link-local packets and it looses "the link info" once its skb->dev is changed to bonding-master. This patch changes this behavior for link-local packets by not changing the skb->dev to the bonding-master and maintaining it as it is, i.e. the link on which the packet arrived. Signed-off-by: Chonggang Li Signed-off-by: Mahesh Bandewar Signed-off-by: Maciej Żenczykowski --- Changes in v2: - Make the commit message more clearer. drivers/net/bonding/bond_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 01e4a69af421..6bd3b50faf48 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1176,6 +1176,9 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) } } + /* don't change skb->dev for link-local packets */ + if (is_link_local_ether_addr(eth_hdr(skb)->h_dest)) + return RX_HANDLER_PASS; if (bond_should_deliver_exact_match(skb, slave, bond)) return RX_HANDLER_EXACT; -- 2.12.2.762.g0e3151a226-goog