From 7df769600bad1447d20aee942f1867641bd6bb32 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 27 Sep 2019 09:12:16 +0200 Subject: [PATCH] settings: fix creation of default-wired-connection in device_realized() Fixes-test: @allow_wired_connections Fixes: 3e39d2a5861a ('settings: shortcut check for whether to create auto-default wired connection') --- src/settings/nm-settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 61f9eccc87..453d3116b9 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -3429,7 +3429,7 @@ device_realized (NMDevice *device, GParamSpec *pspec, NMSettings *self) /* If the device isn't managed or it already has a default wired connection, * ignore it. */ - if ( !NM_DEVICE_GET_CLASS (self)->new_default_connection + if ( !NM_DEVICE_GET_CLASS (device)->new_default_connection || !nm_device_get_managed (device, FALSE) || g_object_get_qdata (G_OBJECT (device), _default_wired_connection_quark ())) return;