diff options
author | Zhang Changzhong <zhangchangzhong@huawei.com> | 2022-02-16 15:18:08 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-17 19:55:21 +0100 |
commit | a6ab75cec1e461f8a35559054c146c21428430b8 (patch) | |
tree | ed167d7da2ecd7e8607faef3362518519222458c /arch/arm64/boot/dts/ti | |
parent | nfp: flower: netdev offload check for ip6gretap (diff) | |
download | linux-a6ab75cec1e461f8a35559054c146c21428430b8.tar.xz linux-a6ab75cec1e461f8a35559054c146c21428430b8.zip |
bonding: force carrier update when releasing slave
In __bond_release_one(), bond_set_carrier() is only called when bond
device has no slave. Therefore, if we remove the up slave from a master
with two slaves and keep the down slave, the master will remain up.
Fix this by moving bond_set_carrier() out of if (!bond_has_slaves(bond))
statement.
Reproducer:
$ insmod bonding.ko mode=0 miimon=100 max_bonds=2
$ ifconfig bond0 up
$ ifenslave bond0 eth0 eth1
$ ifconfig eth0 down
$ ifenslave -d bond0 eth1
$ cat /proc/net/bonding/bond0
Fixes: ff59c4563a8d ("[PATCH] bonding: support carrier state for master")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Link: https://lore.kernel.org/r/1645021088-38370-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'arch/arm64/boot/dts/ti')
0 files changed, 0 insertions, 0 deletions