mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 19:28:04 +02:00
ovs, dpdk: ignore ovs-netdev tun interface
When configuring a OVS bridge to use the netdev datapath, OpenvSwitch will create a tun interface named ovs-netdev. This interface should be ignored by NetworkManager.
This commit is contained in:
parent
11e8b3375f
commit
004a8fdd68
3 changed files with 9 additions and 2 deletions
|
|
@ -542,6 +542,12 @@ create_device(NMDeviceFactory *factory,
|
||||||
NM_SETTING_TUN_SETTING_NAME),
|
NM_SETTING_TUN_SETTING_NAME),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
/* OpenvSwitch will create a tun device named ovs-netdev when the datapath selected is netdev */
|
||||||
|
if (nm_streq0(iface, "ovs-netdev")) {
|
||||||
|
*out_ignore = TRUE;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return g_object_new(NM_TYPE_DEVICE_TUN,
|
return g_object_new(NM_TYPE_DEVICE_TUN,
|
||||||
NM_DEVICE_IFACE,
|
NM_DEVICE_IFACE,
|
||||||
iface,
|
iface,
|
||||||
|
|
|
||||||
|
|
@ -6329,7 +6329,8 @@ device_recheck_slave_status(NMDevice *self, const NMPlatformLink *plink)
|
||||||
plink_master = nm_platform_link_get(nm_device_get_platform(self), plink->master);
|
plink_master = nm_platform_link_get(nm_device_get_platform(self), plink->master);
|
||||||
plink_master_keep_alive = nmp_object_ref(NMP_OBJECT_UP_CAST(plink_master));
|
plink_master_keep_alive = nmp_object_ref(NMP_OBJECT_UP_CAST(plink_master));
|
||||||
|
|
||||||
if (master == NULL && plink_master && nm_streq0(plink_master->name, "ovs-system")
|
if (master == NULL && plink_master
|
||||||
|
&& NM_IN_STRSET(plink_master->name, "ovs-system", "ovs-netdev")
|
||||||
&& plink_master->type == NM_LINK_TYPE_OPENVSWITCH) {
|
&& plink_master->type == NM_LINK_TYPE_OPENVSWITCH) {
|
||||||
_LOGD(LOGD_DEVICE, "the device claimed by openvswitch");
|
_LOGD(LOGD_DEVICE, "the device claimed by openvswitch");
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
||||||
|
|
@ -2792,7 +2792,7 @@ get_existing_connection(NMManager *self, NMDevice *device, gboolean *out_generat
|
||||||
int master_ifindex = nm_platform_link_get_master(priv->platform, ifindex);
|
int master_ifindex = nm_platform_link_get_master(priv->platform, ifindex);
|
||||||
|
|
||||||
/* Check that the master is activating before assuming a
|
/* Check that the master is activating before assuming a
|
||||||
* slave connection. However, ignore ovs-system master as
|
* slave connection. However, ignore ovs-system/ovs-netdev master as
|
||||||
* we never manage it.
|
* we never manage it.
|
||||||
*/
|
*/
|
||||||
if (master_ifindex
|
if (master_ifindex
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue