mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 00:10:07 +01:00
ovsdb: deactivate removed device if does not have a master
When using OVS link aggregation ports, NetworkManager ovsdb is removing the ports when cleaning it up. If that happens, it should deactivate the device even if it does not have controller or the state is not assume/external. An interface that is port of the OVS bonding can be activated before the ovsdb clean up, if it is not deactivated then NetworkManager will finish with a wrong configuration. The 'ovsdb_device_removed()' is already checking that the device is "ovs-interface" with subtype "system".
This commit is contained in:
parent
4549995052
commit
e44cdc7981
1 changed files with 0 additions and 9 deletions
|
|
@ -165,15 +165,6 @@ ovsdb_device_removed(NMOvsdb * ovsdb,
|
|||
continue;
|
||||
if (!nm_streq0(nm_setting_ovs_interface_get_interface_type(s_ovs_int), "system"))
|
||||
continue;
|
||||
/* Failing the system interface device is almost always the right
|
||||
* thing to do when the ovsdb entry is removed. However, to avoid
|
||||
* that a late device-removed signal tears down a different,
|
||||
* newly-activated connection, let's also check that we have a master.
|
||||
* Or in alternative, that the device is assumed/external: in such
|
||||
* case it's always fine to fail the device.
|
||||
*/
|
||||
if (!nm_device_get_master(d) && !nm_device_sys_iface_state_is_external_or_assume(d))
|
||||
continue;
|
||||
|
||||
device = d;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue