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]
Date:	Tue, 29 May 2007 19:47:09 -0700
From:	"Laurent Chavey" <chavey@...gle.com>
To:	netdev@...r.kernel.org
Subject: Re: bond_compute_features() does not handle devices with different CSUM

proposed change.

--- 2.6.20/drivers/net/bonding/bond_main.c      2007-05-29
19:43:39.010565000 -0700
+++ 2.6.20.fix/drivers/net/bonding/bond_main.c  2007-05-29
19:46:12.376980000 -0700
@@ -1227,7 +1227,14 @@
        int i;

        bond_for_each_slave(bond, slave, i) {
-               features &= (slave->dev->features & BOND_INTERSECT_FEATURES);
+               /* NETIF_F_HW_CSUM includes support for NET_IF_IP_CSUM
+                * as such when looking for the intersection we need to
+                * add it to the device supported features
+                */
+               unsigned long dev_features = slave->dev->features;
+               if (slave->dev->features & NETIF_F_HW_CSUM)
+                       dev_features |= NETIF_F_IP_CSUM;
+               features &= (features & BOND_INTERSECT_FEATURES);
                if (slave->dev->hard_header_len > max_hard_header_len)
                        max_hard_header_len = slave->dev->hard_header_len;
        }



On 5/29/07, Laurent Chavey <chavey@...gle.com> wrote:
> kernel version <= 2.6.20.1
> file drivers/net/bonding/bonding_main.c
> function bond_compute_features()
>
> -----------
>   Given a system with two different NIC. One driver sets
>         dev->features |=  NETIF_F_HW_CSUM
>   the other driver sets
>         dev->features |=  NETIF_F_IP_CSUM
>
>   when enslaving the 2 device above, bond_compute_features()
>   does not set the intersection of the 2 CSUM
>   features (should be NETIF_F_IP_CSUM)
> -----------
>
>    should the bond features in the case above include NETIF_F_IP_CSUM
>
-
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