diff --git a/src/core/devices/nm-device-loopback.c b/src/core/devices/nm-device-loopback.c index 7a15607f81..269c772a4f 100644 --- a/src/core/devices/nm-device-loopback.c +++ b/src/core/devices/nm-device-loopback.c @@ -103,6 +103,7 @@ nm_device_loopback_class_init(NMDeviceLoopbackClass *klass) device_class->update_connection = update_connection; device_class->act_stage1_prepare_set_hwaddr_ethernet = TRUE; device_class->get_configured_mtu = get_configured_mtu; + device_class->allow_autoconnect_on_external = TRUE; } /*****************************************************************************/ diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 60619a3d85..fc87f831de 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -8207,6 +8207,9 @@ nm_device_autoconnect_allowed(NMDevice *self) GValue instance = G_VALUE_INIT; GValue retval = G_VALUE_INIT; + if (klass->allow_autoconnect_on_external) + return TRUE; + if (nm_device_autoconnect_blocked_get(self, NM_DEVICE_AUTOCONNECT_BLOCKED_ALL)) return FALSE; diff --git a/src/core/devices/nm-device.h b/src/core/devices/nm-device.h index 382c866053..40f8d11a3c 100644 --- a/src/core/devices/nm-device.h +++ b/src/core/devices/nm-device.h @@ -208,6 +208,8 @@ typedef struct _NMDeviceClass { bool can_reapply_change_ovs_external_ids : 1; + bool allow_autoconnect_on_external : 1; + NMRfkillType rfkill_type : 4; void (*state_changed)(NMDevice *device,