settings: fix creation of default-wired-connection in device_realized()

Fixes-test: @allow_wired_connections

Fixes: 3e39d2a586 ('settings: shortcut check for whether to create auto-default wired connection')
This commit is contained in:
Thomas Haller 2019-09-27 09:12:16 +02:00
parent 41fc9196aa
commit 7df769600b

View file

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