diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c index fda1085063..cef3f9b3b0 100644 --- a/src/devices/nm-device-bond.c +++ b/src/devices/nm-device-bond.c @@ -75,7 +75,6 @@ check_connection_available (NMDevice *device, static gboolean check_connection_compatible (NMDevice *device, NMConnection *connection) { - const char *iface; NMSettingBond *s_bond; if (!NM_DEVICE_CLASS (nm_device_bond_parent_class)->check_connection_compatible (device, connection)) @@ -85,11 +84,6 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) if (!s_bond || !nm_connection_is_type (connection, NM_SETTING_BOND_SETTING_NAME)) return FALSE; - /* Bond connections must specify the virtual interface name */ - iface = nm_connection_get_interface_name (connection); - if (!iface || strcmp (nm_device_get_iface (device), iface)) - return FALSE; - /* FIXME: match bond properties like mode, etc? */ return TRUE; diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c index 4e23de2bb4..e008213906 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -73,7 +73,6 @@ check_connection_available (NMDevice *device, static gboolean check_connection_compatible (NMDevice *device, NMConnection *connection) { - const char *iface; NMSettingBridge *s_bridge; const char *mac_address; @@ -84,11 +83,6 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) if (!s_bridge || !nm_connection_is_type (connection, NM_SETTING_BRIDGE_SETTING_NAME)) return FALSE; - /* Bridge connections must specify the virtual interface name */ - iface = nm_connection_get_interface_name (connection); - if (!iface || strcmp (nm_device_get_iface (device), iface)) - return FALSE; - mac_address = nm_setting_bridge_get_mac_address (s_bridge); if (mac_address && nm_device_is_real (device)) { const char *hw_addr; diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c index 17ee6e82fa..4560dd9259 100644 --- a/src/devices/nm-device-macvlan.c +++ b/src/devices/nm-device-macvlan.c @@ -376,7 +376,7 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) { NMDeviceMacvlanPrivate *priv = NM_DEVICE_MACVLAN_GET_PRIVATE (device); NMSettingMacvlan *s_macvlan; - const char *parent, *iface = NULL; + const char *parent = NULL; if (!NM_DEVICE_CLASS (nm_device_macvlan_parent_class)->check_connection_compatible (device, connection)) return FALSE; @@ -409,13 +409,6 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) } } - /* Ensure the interface name matches */ - iface = nm_connection_get_interface_name (connection); - if (iface) { - if (g_strcmp0 (nm_device_get_ip_iface (device), iface) != 0) - return FALSE; - } - return TRUE; } diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c index a9b3c8bc69..fab48d7367 100644 --- a/src/devices/nm-device-vlan.c +++ b/src/devices/nm-device-vlan.c @@ -390,7 +390,7 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) { NMDeviceVlanPrivate *priv = NM_DEVICE_VLAN_GET_PRIVATE (device); NMSettingVlan *s_vlan; - const char *parent, *iface = NULL; + const char *parent = NULL; if (!NM_DEVICE_CLASS (nm_device_vlan_parent_class)->check_connection_compatible (device, connection)) return FALSE; @@ -416,16 +416,6 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) } } - /* Ensure the interface name matches. If not specified we assume a match - * since both the parent interface and the VLAN ID matched by the time we - * get here. - */ - iface = nm_connection_get_interface_name (connection); - if (iface) { - if (g_strcmp0 (nm_device_get_ip_iface (device), iface) != 0) - return FALSE; - } - return TRUE; } diff --git a/src/devices/nm-device-vxlan.c b/src/devices/nm-device-vxlan.c index d7ded881dd..9317ef5be0 100644 --- a/src/devices/nm-device-vxlan.c +++ b/src/devices/nm-device-vxlan.c @@ -296,7 +296,7 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) { NMDeviceVxlanPrivate *priv = NM_DEVICE_VXLAN_GET_PRIVATE (device); NMSettingVxlan *s_vxlan; - const char *iface, *parent; + const char *parent; if (!NM_DEVICE_CLASS (nm_device_vxlan_parent_class)->check_connection_compatible (device, connection)) return FALSE; @@ -305,12 +305,6 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) if (!s_vxlan) return FALSE; - iface = nm_connection_get_interface_name (connection); - if (iface) { - if (g_strcmp0 (nm_device_get_ip_iface (device), iface) != 0) - return FALSE; - } - if (nm_device_is_real (device)) { parent = nm_setting_vxlan_get_parent (s_vxlan); if ( parent diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c index 0fc3164313..2258d99d32 100644 --- a/src/devices/team/nm-device-team.c +++ b/src/devices/team/nm-device-team.c @@ -85,7 +85,6 @@ check_connection_available (NMDevice *device, static gboolean check_connection_compatible (NMDevice *device, NMConnection *connection) { - const char *iface; NMSettingTeam *s_team; if (!NM_DEVICE_CLASS (nm_device_team_parent_class)->check_connection_compatible (device, connection)) @@ -95,11 +94,6 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) if (!s_team || !nm_connection_is_type (connection, NM_SETTING_TEAM_SETTING_NAME)) return FALSE; - /* Team connections must specify the virtual interface name */ - iface = nm_connection_get_interface_name (connection); - if (!iface || strcmp (nm_device_get_iface (device), iface)) - return FALSE; - /* FIXME: match team properties like mode, etc? */ return TRUE;