Skip to content

Commit 546add7

Browse files
ole2pldavem330
authored andcommitted
bonding: reread information about speed and duplex when interface goes up
When an interface was enslaved when it was down, bonding thinks it has speed -1 even after it goes up. This leads into selecting a wrong active interface in active/backup mode on mixed 10G/1G or 1G/100M environment. before: bonding: bond0: link status definitely up for interface eth5, 100 Mbps full duplex. bonding: bond0: link status definitely up for interface eth0, 100 Mbps full duplex. after: bonding: bond0: link status definitely up for interface eth5, 10000 Mbps full duplex. bonding: bond0: link status definitely up for interface eth0, 1000 Mbps full duplex. Signed-off-by: Krzysztof Piotr Oledzki <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 700c2a7 commit 546add7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2406,6 +2406,8 @@ static void bond_miimon_commit(struct bonding *bond)
24062406
slave->state = BOND_STATE_BACKUP;
24072407
}
24082408

2409+
bond_update_speed_duplex(slave);
2410+
24092411
pr_info("%s: link status definitely up for interface %s, %d Mbps %s duplex.\n",
24102412
bond->dev->name, slave->dev->name,
24112413
slave->speed, slave->duplex ? "full" : "half");

0 commit comments

Comments
 (0)