mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-13 21:20:14 +01:00
ovs: merge branch 'bg/ovs-no-bridge-rh1797696'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/422 https://bugzilla.redhat.com/show_bug.cgi?id=1797696 (cherry picked from commit47f81864ba) (cherry picked from commit4045608ca8)
This commit is contained in:
commit
9055250cef
1 changed files with 11 additions and 2 deletions
|
|
@ -100,6 +100,7 @@ add_iface_cb (GError *error, gpointer user_data)
|
|||
static gboolean
|
||||
enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection, gboolean configure)
|
||||
{
|
||||
NMDeviceOvsPort *self = NM_DEVICE_OVS_PORT (device);
|
||||
NMActiveConnection *ac_port = NULL;
|
||||
NMActiveConnection *ac_bridge = NULL;
|
||||
NMDevice *bridge_device;
|
||||
|
|
@ -109,10 +110,18 @@ enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection, gboo
|
|||
|
||||
ac_port = NM_ACTIVE_CONNECTION (nm_device_get_act_request (device));
|
||||
ac_bridge = nm_active_connection_get_master (ac_port);
|
||||
if (!ac_bridge)
|
||||
ac_bridge = ac_port;
|
||||
if (!ac_bridge) {
|
||||
_LOGW (LOGD_DEVICE, "can't enslave %s: bridge active-connection not found",
|
||||
nm_device_get_iface (slave));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bridge_device = nm_active_connection_get_device (ac_bridge);
|
||||
if (!bridge_device) {
|
||||
_LOGW (LOGD_DEVICE, "can't enslave %s: bridge device not found",
|
||||
nm_device_get_iface (slave));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
nm_ovsdb_add_interface (nm_ovsdb_get (),
|
||||
nm_active_connection_get_applied_connection (ac_bridge),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue