mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 06:10:11 +01:00
vlan: make connection available if the device is not real
Otherwise NMDevice would do and always fail a carrier check, making it impossible to ever manually activate a vlan connection.
This commit is contained in:
parent
d1bd8c7132
commit
48695df023
1 changed files with 13 additions and 0 deletions
|
|
@ -432,6 +432,18 @@ check_connection_compatible (NMDevice *device, NMConnection *connection)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_connection_available (NMDevice *device,
|
||||
NMConnection *connection,
|
||||
NMDeviceCheckConAvailableFlags flags,
|
||||
const char *specific_object)
|
||||
{
|
||||
if (!nm_device_is_real (device))
|
||||
return TRUE;
|
||||
|
||||
return NM_DEVICE_CLASS (nm_device_vlan_parent_class)->check_connection_available (device, connection, flags, specific_object);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
complete_connection (NMDevice *device,
|
||||
NMConnection *connection,
|
||||
|
|
@ -691,6 +703,7 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass)
|
|||
parent_class->notify_new_device_added = notify_new_device_added;
|
||||
|
||||
parent_class->check_connection_compatible = check_connection_compatible;
|
||||
parent_class->check_connection_available = check_connection_available;
|
||||
parent_class->complete_connection = complete_connection;
|
||||
parent_class->update_connection = update_connection;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue