From 867f94cc75296b8e5c5436967a9c93c3da057803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 25 Aug 2015 16:10:40 +0200 Subject: manager: call nm_device_realize() also for generic devices Without that the device is not properly initialized. It misses hardware address and type description. Testcase: $ sudo ip link add dummy0 type dummy $ nmcli device DEVICE TYPE STATE CONNECTION em1 ethernet connected Ethernet connection 1 FF wifi connected -- bond0 bond unmanaged -- bond1 bond unmanaged -- dummy0 unmanaged -- lo unmanaged -- Fixes: e8139f56c26ae3bcc5e14abdb29970ae07e93299 --- src/nm-manager.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nm-manager.c b/src/nm-manager.c index 5744a8cdc9..079459d446 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1887,6 +1887,11 @@ platform_link_added (NMManager *self, /* fall through */ default: device = nm_device_generic_new (plink); + if (!nm_device_realize (device, plink, &error)) { + nm_log_warn (LOGD_HW, "%s: failed to initialize generic device: %s", + plink->name, error->message); + g_clear_error (&error); + } break; } } -- cgit v1.2.1