mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-14 21:50:30 +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') (cherry picked from commitc5c49995b1)
This commit is contained in:
parent
d8fb95d22b
commit
7494a2e37a
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