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: <416.1188343604@death>
Date:	Tue, 28 Aug 2007 16:26:44 -0700
From:	Jay Vosburgh <fubar@...ibm.com>
To:	Moni Shoua <monis@...taire.com>
cc:	rdreier@...co.com, davem@...emloft.net, netdev@...r.kernel.org,
	general@...ts.openfabrics.org
Subject: Re: [PATCH V4 8/10] net/bonding: Handlle wrong assumptions that slave is always an Ethernet device 

Moni Shoua <monis@...taire.com> wrote:

>bonding sometimes uses Ethernet constants (such as MTU and address length) which
>are not good when it enslaves non Ethernet devices (such as InfiniBand).
>
>Signed-off-by: Moni Shoua <monis@...taire.com>
>---
> drivers/net/bonding/bond_main.c  |    3 ++-
> drivers/net/bonding/bond_sysfs.c |   19 +++++++++++++------
> drivers/net/bonding/bonding.h    |    1 +
> 3 files changed, 16 insertions(+), 7 deletions(-)
>
>Index: net-2.6/drivers/net/bonding/bond_main.c
>===================================================================
>--- net-2.6.orig/drivers/net/bonding/bond_main.c	2007-08-15 10:55:48.000000000 +0300
>+++ net-2.6/drivers/net/bonding/bond_main.c	2007-08-20 14:29:11.911298577 +0300
>@@ -1224,7 +1224,8 @@ static int bond_compute_features(struct 
> 	struct slave *slave;
> 	struct net_device *bond_dev = bond->dev;
> 	unsigned long features = bond_dev->features;
>-	unsigned short max_hard_header_len = ETH_HLEN;
>+	unsigned short max_hard_header_len = max((u16)ETH_HLEN,
>+						bond_dev->hard_header_len);

	Since non-IB bonding masters are run through ether_setup, which
sets hard_header_len to ETH_HLEN, the max() is probably unnecessary, and
I think this could just be bond_dev->hard_header_len.

	-J

---
	-Jay Vosburgh, IBM Linux Technology Center, fubar@...ibm.com
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ