diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-08-25 16:10:40 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-08-25 16:16:50 +0200 |
commit | 867f94cc75296b8e5c5436967a9c93c3da057803 (patch) | |
tree | 204fe0080d4a6bab7ada90a14a11b13be4c7a426 | |
parent | 0bc335cfbee754b472686cbad96cb6ad6d9c6a0a (diff) | |
download | NetworkManager-867f94cc75296b8e5c5436967a9c93c3da057803.tar.gz |
manager: call nm_device_realize() also for generic devicesjk/setup-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
-rw-r--r-- | src/nm-manager.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } } |