mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 20:30:13 +01:00
ovs: don't release slaves on quit
An OVS bridge and its slaves can continue to work even after NM has quit. Keep the interface enslaved when the @configure argument of device->release_slave() is FALSE, which happens on quit and in other circumstances when we don't really want to release the slave from its master. https://bugzilla.redhat.com/show_bug.cgi?id=1733709 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/215 (cherry picked from commitccd4be4014) (cherry picked from commita1f39b69e0) (cherry picked from commitf93018a41a) (cherry picked from commit647c054bce)
This commit is contained in:
parent
ecaf1acb76
commit
e4167a6c81
1 changed files with 8 additions and 2 deletions
|
|
@ -166,8 +166,14 @@ del_iface_cb (GError *error, gpointer user_data)
|
|||
static void
|
||||
release_slave (NMDevice *device, NMDevice *slave, gboolean configure)
|
||||
{
|
||||
nm_ovsdb_del_interface (nm_ovsdb_get (), nm_device_get_iface (slave),
|
||||
del_iface_cb, g_object_ref (slave));
|
||||
NMDeviceOvsPort *self = NM_DEVICE_OVS_PORT (device);
|
||||
|
||||
if (configure) {
|
||||
_LOGI (LOGD_DEVICE, "releasing ovs interface %s", nm_device_get_ip_iface (slave));
|
||||
nm_ovsdb_del_interface (nm_ovsdb_get (), nm_device_get_iface (slave),
|
||||
del_iface_cb, g_object_ref (slave));
|
||||
} else
|
||||
_LOGI (LOGD_DEVICE, "ovs interface %s was released", nm_device_get_ip_iface (slave));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue