linux/drivers/net/bonding
Mark Bloch 1533e77315 net/bonding: Enforce active-backup policy for IPoIB bonds
When using an IPoIB bond currently only active-backup mode is a valid
use case and this commit strengthens it.

Since commit 2ab82852a2 ("net/bonding: Enable bonding to enslave
netdevices not supporting set_mac_address()") was introduced till
4.7-rc1, IPoIB didn't support the set_mac_address ndo, and hence the
fail over mac policy always applied to IPoIB bonds.

With the introduction of commit 492a7e67ff ("IB/IPoIB: Allow setting
the device address"), that doesn't hold and practically IPoIB bonds are
broken as of that. To fix it, lets go to fail over mac if the device
doesn't support the ndo OR this is IPoIB device.

As a by-product, this commit also prevents a stack corruption which
occurred when trying to copy 20 bytes (IPoIB) device address
to a sockaddr struct that has only 16 bytes of storage.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-07-25 10:18:58 -07:00
..
bond_3ad.c bonding: prevent out of bound accesses 2016-07-01 06:06:09 -04:00
bond_alb.c bonding: prevent out of bound accesses 2016-07-01 06:06:09 -04:00
bond_debugfs.c net: Move bonding headers under include/net 2014-11-10 13:27:49 -05:00
bond_main.c net/bonding: Enforce active-backup policy for IPoIB bonds 2016-07-25 10:18:58 -07:00
bond_netlink.c bonding: set carrier off for devices created through netlink 2016-07-14 16:17:43 -07:00
bond_options.c bonding: 3ad: allow to set ad_actor settings while the bond is up 2016-02-11 04:31:11 -05:00
bond_procfs.c bonding: Display LACP info only to CAP_NET_ADMIN capable user 2015-06-23 03:11:52 -07:00
bond_sysfs_slave.c bonding: export slave's partner_oper_port_state via sysfs and netlink 2015-06-15 16:40:24 -07:00
bond_sysfs.c bonding: make mii_status sysfs node consistent 2016-01-11 17:14:42 -05:00
bonding_priv.h net/bonding: Make DRV macros private 2015-04-26 22:59:53 -04:00
Makefile bonding: add sysfs /slave dir for bond slave devices. 2014-01-17 18:51:58 -08:00