mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 22:20:27 +01:00
core: return success when port already attached to bridge
Instead of just not logging the error, don't return failure either.
This commit is contained in:
parent
479163db59
commit
06bac8fcda
1 changed files with 8 additions and 3 deletions
|
|
@ -2516,9 +2516,14 @@ nm_system_bridge_attach (int master_ifindex,
|
|||
mif ? mif : master_iface,
|
||||
slave_ifindex,
|
||||
sif ? sif : slave_iface);
|
||||
if (err < 0 && err != -EBUSY) {
|
||||
nm_log_err (LOGD_DEVICE, "(%s): failed to attach slave %s: %s",
|
||||
master_iface, slave_iface, strerror (-err));
|
||||
if (err < 0) {
|
||||
if (err == -EBUSY) {
|
||||
/* Interface already attached to the given bridge */
|
||||
err = 0;
|
||||
} else {
|
||||
nm_log_err (LOGD_DEVICE, "(%s): failed to attach slave %s: %s",
|
||||
master_iface, slave_iface, strerror (-err));
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue