diff --git a/src/core/devices/nm-device-infiniband.c b/src/core/devices/nm-device-infiniband.c index 099c419273..c420b9d7cb 100644 --- a/src/core/devices/nm-device-infiniband.c +++ b/src/core/devices/nm-device-infiniband.c @@ -119,7 +119,7 @@ check_connection_compatible(NMDevice *device, ->check_connection_compatible(device, connection, check_properties, error)) return FALSE; - if (nm_device_is_real(device)) { + if (check_properties && nm_device_is_real(device)) { const char *mac; const char *hw_addr; diff --git a/src/core/devices/nm-device-ip-tunnel.c b/src/core/devices/nm-device-ip-tunnel.c index 35ae500c3f..cc62180e40 100644 --- a/src/core/devices/nm-device-ip-tunnel.c +++ b/src/core/devices/nm-device-ip-tunnel.c @@ -523,7 +523,7 @@ check_connection_compatible(NMDevice *device, return FALSE; } - if (nm_device_is_real(device)) { + if (check_properties && nm_device_is_real(device)) { /* Check parent interface; could be an interface name or a UUID */ parent = nm_setting_ip_tunnel_get_parent(s_ip_tunnel); if (parent && !nm_device_match_parent(device, parent)) { diff --git a/src/core/devices/nm-device-macvlan.c b/src/core/devices/nm-device-macvlan.c index cc2ee54038..8cdef0cfe2 100644 --- a/src/core/devices/nm-device-macvlan.c +++ b/src/core/devices/nm-device-macvlan.c @@ -311,7 +311,7 @@ check_connection_compatible(NMDevice *device, } /* Before the device is realized some properties will not be set */ - if (nm_device_is_real(device)) { + if (check_properties && nm_device_is_real(device)) { if (setting_mode_to_platform(nm_setting_macvlan_get_mode(s_macvlan)) != priv->props.mode) { nm_utils_error_set_literal(error, NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY, diff --git a/src/core/devices/nm-device-tun.c b/src/core/devices/nm-device-tun.c index 8f09040361..430e62aa0e 100644 --- a/src/core/devices/nm-device-tun.c +++ b/src/core/devices/nm-device-tun.c @@ -298,7 +298,7 @@ check_connection_compatible(NMDevice *device, ->check_connection_compatible(device, connection, check_properties, error)) return FALSE; - if (nm_device_is_real(device)) { + if (check_properties && nm_device_is_real(device)) { switch (priv->props.type) { case IFF_TUN: mode = NM_SETTING_TUN_MODE_TUN; diff --git a/src/core/devices/nm-device-vlan.c b/src/core/devices/nm-device-vlan.c index 67b51fce7b..7849e7247b 100644 --- a/src/core/devices/nm-device-vlan.c +++ b/src/core/devices/nm-device-vlan.c @@ -316,7 +316,7 @@ check_connection_compatible(NMDevice *device, ->check_connection_compatible(device, connection, check_properties, error)) return FALSE; - if (nm_device_is_real(device)) { + if (check_properties && nm_device_is_real(device)) { s_vlan = nm_connection_get_setting_vlan(connection); if (nm_setting_vlan_get_id(s_vlan) != priv->vlan_id) { diff --git a/src/core/devices/nm-device-vrf.c b/src/core/devices/nm-device-vrf.c index 7474bfc2a9..b037e8e2a6 100644 --- a/src/core/devices/nm-device-vrf.c +++ b/src/core/devices/nm-device-vrf.c @@ -154,7 +154,7 @@ check_connection_compatible(NMDevice *device, ->check_connection_compatible(device, connection, check_properties, error)) return FALSE; - if (nm_device_is_real(device)) { + if (check_properties && nm_device_is_real(device)) { s_vrf = _nm_connection_get_setting(connection, NM_TYPE_SETTING_VRF); if (priv->props.table != nm_setting_vrf_get_table(s_vrf)) { diff --git a/src/core/devices/nm-device-vxlan.c b/src/core/devices/nm-device-vxlan.c index 1b49ca648b..061ee3f2ef 100644 --- a/src/core/devices/nm-device-vxlan.c +++ b/src/core/devices/nm-device-vxlan.c @@ -251,7 +251,7 @@ check_connection_compatible(NMDevice *device, ->check_connection_compatible(device, connection, check_properties, error)) return FALSE; - if (nm_device_is_real(device)) { + if (check_properties && nm_device_is_real(device)) { s_vxlan = nm_connection_get_setting_vxlan(connection); parent = nm_setting_vxlan_get_parent(s_vxlan);