linux-uconsole/drivers/net/bonding
Andy Gospodarek 247460c92c bonding: fix string comparison errors
[ Upstream commit f4bb2e9c4f ]

When a bond contains a device where one name is the subset of another
(eth1 and eth10, for example), one cannot properly set the primary
device or the currently active device.

This was reported and based on work by Takuma Umeya.  I also verified
the problem and tested that this fix resolves it.

V2: A few did not like the the current code or my changes, so I
refactored bonding_store_primary and bonding_store_active_slave to be a
bit cleaner, dropped the use of strnicmp since we did not really need
the comparison to be case insensitive, and formatted the input string
from sysfs so a comparison to IFNAMSIZ could be used.

I also discovered an error in bonding_store_active_slave that would
modify bond->primary_slave rather than bond->curr_active_slave before
forcing the bonding driver to choose a new active slave.

V3: Actually sending the proper patch....

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Reported-by: Takuma Umeya <tumeya@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-15 18:31:38 -07:00
..
bond_3ad.c net: bonding: factor out rlock(bond->lock) in xmit path 2011-05-09 12:05:59 -07:00
bond_3ad.h Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-05-17 17:33:11 -04:00
bond_alb.c bonding: prevent deadlock on slave store with alb mode (v3) 2011-05-25 17:55:33 -04:00
bond_alb.h bonding: move processing of recv handlers into handle_frame() 2011-04-25 12:00:30 -07:00
bond_debugfs.c bonding: add the debugfs interface to see RLB hash table 2010-12-16 13:16:05 -08:00
bond_ipv6.c bonding/vlan: Fix mangled NAs on slaves without VLAN tag insertion 2010-12-16 12:43:22 -08:00
bond_main.c net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared 2011-08-15 18:31:38 -07:00
bond_procfs.c net-bonding: Fix minor sparse complaints 2011-04-14 22:00:31 -07:00
bond_sysfs.c bonding: fix string comparison errors 2011-08-15 18:31:38 -07:00
bonding.h net: drivers: kill two unused macro definitions 2011-05-15 18:01:15 -04:00
Makefile bonding, ipv4, ipv6, vlan: Handle NETDEV_BONDING_FAILOVER like NETDEV_NOTIFY_PEERS 2011-04-17 23:36:03 -07:00