Skip to content

Commit

Permalink
selftests: bonding: do not set port down before adding to bond
Browse files Browse the repository at this point in the history
Before adding a port to bond, it need to be set down first. In the
lacpdu test the author set the port down specifically. But commit
a4abfa6 ("net: rtnetlink: Enslave device before bringing it up")
changed the operation order, the kernel will set the port down _after_
adding to bond. So all the ports will be down at last and the test failed.

In fact, the veth interfaces are already inactive when added. This
means there's no need to set them down again before adding to the bond.
Let's just remove the link down operation.

Fixes: a4abfa6 ("net: rtnetlink: Enslave device before bringing it up")
Reported-by: Zhengchao Shao <[email protected]>
Closes: https://lore.kernel.org/netdev/[email protected]/
Signed-off-by: Hangbin Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
liuhangbin authored and kuba-moo committed Aug 22, 2023
1 parent d1cdbf6 commit be80942
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ ip link add name veth2-bond type veth peer name veth2-end

# add ports
ip link set fbond master fab-br0
ip link set veth1-bond down master fbond
ip link set veth2-bond down master fbond
ip link set veth1-bond master fbond
ip link set veth2-bond master fbond

# bring up
ip link set veth1-end up
Expand Down

0 comments on commit be80942

Please sign in to comment.