Skip to content
Commit a4abfa62 authored by Phil Sutter's avatar Phil Sutter Committed by Jakub Kicinski
Browse files

net: rtnetlink: Enslave device before bringing it up



Unlike with bridges, one can't add an interface to a bond and set it up
at the same time:

| # ip link set dummy0 down
| # ip link set dummy0 master bond0 up
| Error: Device can not be enslaved while up.

Of all drivers with ndo_add_slave callback, bond and team decline if
IFF_UP flag is set, vrf cycles the interface (i.e., sets it down and
immediately up again) and the others just don't care.

Support the common notion of setting the interface up after enslaving it
by sorting the operations accordingly.

Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20220914150623.24152-1-phil@nwl.cc


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5f4e2564
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment