ovs: allow specifying a system OVS interface by MAC address
The OVS interface can be matched via MAC address; in that case, the
"connection.interface-name" property of the connection is empty.
When populating the ovsdb, we need to pass the actual interface name
from the device, not the one from the connection.
Fixes: 830a5a14cb
('device: add support for OpenVSwitch devices')
https://issues.redhat.com/browse/RHEL-34617
This commit is contained in:
2
NEWS
2
NEWS
@@ -8,6 +8,8 @@ subject to change and not guaranteed to be compatible with
|
|||||||
the later release.
|
the later release.
|
||||||
USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
|
USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
|
||||||
|
|
||||||
|
* Support matching a OVS system interface by MAC address.
|
||||||
|
|
||||||
=============================================
|
=============================================
|
||||||
NetworkManager-1.48
|
NetworkManager-1.48
|
||||||
Overview of changes since NetworkManager-1.46
|
Overview of changes since NetworkManager-1.46
|
||||||
|
@@ -461,7 +461,7 @@ ovsdb_call_method(NMOvsdb *self,
|
|||||||
"new: add-interface bridge=%s port=%s interface=%s",
|
"new: add-interface bridge=%s port=%s interface=%s",
|
||||||
nm_connection_get_interface_name(call->payload.add_interface.bridge),
|
nm_connection_get_interface_name(call->payload.add_interface.bridge),
|
||||||
nm_connection_get_interface_name(call->payload.add_interface.port),
|
nm_connection_get_interface_name(call->payload.add_interface.port),
|
||||||
nm_connection_get_interface_name(call->payload.add_interface.interface));
|
nm_device_get_iface(call->payload.add_interface.interface_device));
|
||||||
break;
|
break;
|
||||||
case OVSDB_DEL_INTERFACE:
|
case OVSDB_DEL_INTERFACE:
|
||||||
call->payload.del_interface.ifname = g_strdup(payload->del_interface.ifname);
|
call->payload.del_interface.ifname = g_strdup(payload->del_interface.ifname);
|
||||||
@@ -945,7 +945,7 @@ _insert_interface(json_t *params,
|
|||||||
|
|
||||||
row = json_pack("{s:s, s:s, s:o, s:o, s:o}",
|
row = json_pack("{s:s, s:s, s:o, s:o, s:o}",
|
||||||
"name",
|
"name",
|
||||||
nm_connection_get_interface_name(interface),
|
nm_device_get_iface(interface_device),
|
||||||
"type",
|
"type",
|
||||||
type ?: "",
|
type ?: "",
|
||||||
"options",
|
"options",
|
||||||
@@ -1196,7 +1196,7 @@ _add_interface(NMOvsdb *self,
|
|||||||
|
|
||||||
bridge_name = nm_connection_get_interface_name(bridge);
|
bridge_name = nm_connection_get_interface_name(bridge);
|
||||||
port_name = nm_connection_get_interface_name(port);
|
port_name = nm_connection_get_interface_name(port);
|
||||||
interface_name = nm_connection_get_interface_name(interface);
|
interface_name = nm_device_get_iface(interface_device);
|
||||||
interface_is_local = nm_streq0(bridge_name, interface_name);
|
interface_is_local = nm_streq0(bridge_name, interface_name);
|
||||||
|
|
||||||
/* Determine cloned MAC addresses */
|
/* Determine cloned MAC addresses */
|
||||||
|
Reference in New Issue
Block a user