]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: correctly update link status during mii-commit phase
authorMahesh Bandewar <maheshb@google.com>
Mon, 27 Mar 2017 18:37:37 +0000 (11:37 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Mar 2017 04:11:50 +0000 (21:11 -0700)
commit040064f4a64652a548b31cc937f65d71ea15bee6
tree75541605c4bc1086f972d1fc8cda522143a4063c
parentbf15ad9616f762dd1fd01f2fa11329fdc745e494
bonding: correctly update link status during mii-commit phase

bond_miimon_commit() marks the link UP after attempting to get the speed
and duplex settings for the link. There is a possibility that
bond_update_speed_duplex() could fail. This is another place where it
could result into an inconsistent bonding link state.

With this patch the link will be marked UP only if the speed and duplex
values retrieved have sane values and processed further.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c