bonding: 802.3ad - fix agg_device_up
authorJiri Bohac <jbohac@suse.cz>
Tue, 19 Apr 2011 02:09:55 +0000 (02:09 +0000)
committerSteve Conklin <sconklin@canonical.com>
Fri, 15 Jul 2011 17:20:55 +0000 (12:20 -0500)
commit5ef4c9f0a21d30145f4cfcc8e3079dd7a23ce45b
tree4bb500848689bb472bba345b5a74c0f509e970a5
parent9ee6bf5166ced7351a02c7258bb3026c97d9d60d
bonding: 802.3ad - fix agg_device_up

BugLink: http://bugs.launchpad.net/bugs/793702

[ Upstream commit 2430af8b7fa37ac0be102c77f9dc6ee669d24ba9 ]

The slave member of struct aggregator does not necessarily point
to a slave which is part of the aggregator. It points to the
slave structure containing the aggregator structure, while
completely different slaves (or no slaves at all) may be part of
the aggregator.

The agg_device_up() function wrongly uses agg->slave to find the state
of the aggregator.  Use agg->lag_ports->slave instead. The bug has
been introduced by commit 4cd6fe1c6483cde93e2ec91f58b7af9c9eea51ad
("bonding: fix link down handling in 802.3ad mode").

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/bonding/bond_3ad.c