lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <14204.1492453697@famine>
Date:   Mon, 17 Apr 2017 11:28:17 -0700
From:   Jay Vosburgh <jay.vosburgh@...onical.com>
To:     Chonggang Li <chonggangli@...gle.com>
cc:     andy@...yhouse.net, vfalico@...il.com, nikolay@...hat.com,
        edumazet@...gle.com, davem@...emloft.net, netdev@...r.kernel.org,
        Mahesh Bandewar <maheshb@...gle.com>,
        Maciej Żenczykowski <maze@...gle.com>
Subject: Re: [PATCH net-next v2] bonding: deliver link-local packets with skb->dev set to link that packets arrived on

Chonggang Li <chonggangli@...gle.com> wrote:

>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.

	Minor nit: "looses" should be "loses".  Other than that:

Signed-off-by: Jay Vosburgh <jay.vosburgh@...onical.com>


>Signed-off-by: Chonggang Li <chonggangli@...gle.com>
>Signed-off-by: Mahesh Bandewar <maheshb@...gle.com>
>Signed-off-by: Maciej Żenczykowski <maze@...gle.com>
>---
>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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ