mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 23:00:19 +01:00
settings: shortcut check for whether to create auto-default wired connection
This check is only useful for devices that implement new_default_connection. We can shortcut the possibly expensive checks like have_connection_for_device(), which need to iterate all profiles.
This commit is contained in:
parent
5aa50d7c87
commit
3e39d2a586
1 changed files with 2 additions and 1 deletions
|
|
@ -3435,7 +3435,8 @@ device_realized (NMDevice *device, GParamSpec *pspec, NMSettings *self)
|
||||||
/* If the device isn't managed or it already has a default wired connection,
|
/* If the device isn't managed or it already has a default wired connection,
|
||||||
* ignore it.
|
* ignore it.
|
||||||
*/
|
*/
|
||||||
if ( !nm_device_get_managed (device, FALSE)
|
if ( !NM_DEVICE_GET_CLASS (self)->new_default_connection
|
||||||
|
|| !nm_device_get_managed (device, FALSE)
|
||||||
|| g_object_get_qdata (G_OBJECT (device), _default_wired_connection_quark ())
|
|| g_object_get_qdata (G_OBJECT (device), _default_wired_connection_quark ())
|
||||||
|| have_connection_for_device (self, device)
|
|| have_connection_for_device (self, device)
|
||||||
|| nm_config_get_no_auto_default_for_device (priv->config, device))
|
|| nm_config_get_no_auto_default_for_device (priv->config, device))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue