mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 16:10:36 +01:00
ovs: fail port enslavement when the bridge device is not found
Fail the enslavement of the ovs port if the bridge device is not
found, instead of generating assertions and potentially crash later.
https://bugzilla.redhat.com/show_bug.cgi?id=1797696
Fixes: 101e65d2bb ('ovs: allow changing mac address of bridges and interfaces')
This commit is contained in:
parent
c8b5a3f91a
commit
c5c49995b1
1 changed files with 5 additions and 0 deletions
|
|
@ -103,6 +103,11 @@ enslave_slave (NMDevice *device, NMDevice *slave, NMConnection *connection, gboo
|
|||
}
|
||||
|
||||
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