Skip to contentSkip to conversation

bonding: incorrect bonding state reported via ioctl

PATCH New Andy Gospodarek 1 participant 1 message Nov 21, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: incorrect bonding state reported via ioctl

This is a small fix-up to finish out the work done by Jay Vosburgh to add carrier-state support for bonding devices. The output in /proc/net/bonding/bondX was correct, but when collecting the same info via an iotcl it could still be incorrect.

---

 bond_main.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/net/bonding/bond_main.c +1 -1
@@ -3547,7 +3547,7 @@ static int bond_do_ioctl(struct net_devi
 			mii->val_out = 0;
 			read_lock_bh(&bond->lock);
 			read_lock(&bond->curr_slave_lock);
-			if (bond->curr_active_slave) {
+			if (netif_carrier_ok(bond->dev)) {
 				mii->val_out = BMSR_LSTATUS;
 			}
 			read_unlock(&bond->curr_slave_lock);