mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
selftests: bonding: do not set port down when adding to bond
[ Upstream commit61fa2493ca
] Similar to commitbe80942465
("selftests: bonding: do not set port down before adding to bond"). The bond-arp-interval-causes-panic test failed after commita4abfa627c
("net: rtnetlink: Enslave device before bringing it up") as the kernel will set the port down _after_ adding to bond if setting port down specifically. Fix it by removing the link down operation when adding to bond. Fixes:2ffd57327f
("selftests: bonding: cause oops in bond_rr_gen_slave_id") Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Tested-by: Benjamin Poirier <benjamin.poirier@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3edd66bd4e
commit
85f6fae44b
@ -33,16 +33,16 @@ ip netns add "client"
|
||||
ip link set dev link1_1 netns client down name eth0
|
||||
ip netns exec client ip link add dev bond0 down type bond mode 1 \
|
||||
miimon 100 all_slaves_active 1
|
||||
ip netns exec client ip link set dev eth0 down master bond0
|
||||
ip netns exec client ip link set dev eth0 master bond0
|
||||
ip netns exec client ip link set dev bond0 up
|
||||
ip netns exec client ip addr add ${client_ip4}/24 dev bond0
|
||||
ip netns exec client ping -c 5 $server_ip4 >/dev/null
|
||||
|
||||
ip netns exec client ip link set dev eth0 down nomaster
|
||||
ip netns exec client ip link set dev eth0 nomaster
|
||||
ip netns exec client ip link set dev bond0 down
|
||||
ip netns exec client ip link set dev bond0 type bond mode 0 \
|
||||
arp_interval 1000 arp_ip_target "+${server_ip4}"
|
||||
ip netns exec client ip link set dev eth0 down master bond0
|
||||
ip netns exec client ip link set dev eth0 master bond0
|
||||
ip netns exec client ip link set dev bond0 up
|
||||
ip netns exec client ping -c 5 $server_ip4 >/dev/null
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user