allow autoconnect on external

This commit is contained in:
Wen Liang 2022-07-22 10:28:30 -04:00
parent 63b43dfd23
commit 86a6cc1de7
3 changed files with 6 additions and 0 deletions

View file

@ -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;
}
/*****************************************************************************/

View file

@ -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;

View file

@ -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,