mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-12 07:40:31 +01:00
device: move check for config "no-auto-default" to NMDevice's new_default_connection()
Only NMDeviceEthernet implements new_default_connection(). Anyway, it makes only sense to do this precheck by the caller first, and not by each implementation.
This commit is contained in:
parent
da72f276cd
commit
7644b18443
2 changed files with 3 additions and 3 deletions
|
|
@ -1435,9 +1435,6 @@ new_default_connection (NMDevice *self)
|
|||
gs_free char *uuid = NULL;
|
||||
guint i, n_connections;
|
||||
|
||||
if (nm_config_get_no_auto_default_for_device (nm_config_get (), self))
|
||||
return NULL;
|
||||
|
||||
perm_hw_addr = nm_device_get_permanent_hw_address (self);
|
||||
iface = nm_device_get_iface (self);
|
||||
|
||||
|
|
|
|||
|
|
@ -4796,6 +4796,9 @@ nm_device_new_default_connection (NMDevice *self)
|
|||
if (!NM_DEVICE_GET_CLASS (self)->new_default_connection)
|
||||
return NULL;
|
||||
|
||||
if (nm_config_get_no_auto_default_for_device (nm_config_get (), self))
|
||||
return NULL;
|
||||
|
||||
connection = NM_DEVICE_GET_CLASS (self)->new_default_connection (self);
|
||||
if (!connection)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue