mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 01:10:08 +01:00
core/ovs: minor cleanup of logic in _add_interface()
This commit is contained in:
parent
8d78f8effb
commit
263e92bf49
1 changed files with 8 additions and 6 deletions
|
|
@ -781,11 +781,12 @@ _add_interface(NMOvsdb * self,
|
|||
/* This would be a violation of ovsdb's reference integrity (a bug). */
|
||||
_LOGW("Unknown port '%s' in bridge '%s'", port_uuid, bridge_uuid);
|
||||
continue;
|
||||
} else if (!nm_streq(ovs_port->name, port_name)
|
||||
|| !nm_streq0(ovs_port->connection_uuid, nm_connection_get_uuid(port))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!nm_streq(ovs_port->name, port_name)
|
||||
|| !nm_streq0(ovs_port->connection_uuid, nm_connection_get_uuid(port)))
|
||||
continue;
|
||||
|
||||
for (ii = 0; ii < ovs_port->interfaces->len; ii++) {
|
||||
interface_uuid = g_ptr_array_index(ovs_port->interfaces, ii);
|
||||
ovs_interface = g_hash_table_lookup(priv->interfaces, interface_uuid);
|
||||
|
|
@ -795,9 +796,10 @@ _add_interface(NMOvsdb * self,
|
|||
if (!ovs_interface) {
|
||||
/* This would be a violation of ovsdb's reference integrity (a bug). */
|
||||
_LOGW("Unknown interface '%s' in port '%s'", interface_uuid, port_uuid);
|
||||
} else if (nm_streq(ovs_interface->name, interface_name)
|
||||
&& nm_streq0(ovs_interface->connection_uuid,
|
||||
nm_connection_get_uuid(interface)))
|
||||
continue;
|
||||
}
|
||||
if (nm_streq(ovs_interface->name, interface_name)
|
||||
&& nm_streq0(ovs_interface->connection_uuid, nm_connection_get_uuid(interface)))
|
||||
has_interface = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue