summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2015-10-29 15:15:44 +0100
committerLubomir Rintel <lkundrak@v3.sk>2015-10-30 10:17:20 +0100
commitab90def60b8e454f5cd7d35cea236343c7a508e5 (patch)
tree44e0dca70033cdca9ffe858b96a4781b104990d2
parent70fdf6c6fd30a27f461ed02646b7be5ccfe75216 (diff)
downloadNetworkManager-lr/ubuntu-1-0.tar.gz
Don't crash when a device can't be created; just warn.lr/ubuntu-1-0
This was apparently how things were handled in 0.9.10; but changed in 1.0.4. Still, on some devices (phones!) a failure to have the NMDeviceFactory create the device can happen even if the device technically has a type, and in that case it seems that the error message does not get set. The issue we've seen seemed to be with ccmni0 being detected as a wifi device, but bad kernel drivers with an incomplete WEXT extension set would report a WEXT version of 0 and thus fail its activation. This won't fix those devices, but the message will show up in logs, along with the interface name so we can then fix that interface properly.
-rw-r--r--src/nm-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 20dfca0ad0..2038c726e5 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -2006,7 +2006,7 @@ platform_link_added (NMManager *self,
if (!device) {
if (!ignore) {
nm_log_warn (LOGD_HW, "%s: factory failed to create device: %s",
- plink->name, error->message);
+ plink->name, error ? error->message : "(unknown)");
g_clear_error (&error);
}
return;