summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-09-08 09:46:56 +0200
committerJiří Klimeš <jklimes@redhat.com>2015-09-08 09:46:56 +0200
commitff434af2c5eceb7ebc2aaffb154ceb39f7b857bb (patch)
tree7bd64715bfc151552e991acf98d6bffcdc66eae9 /src
parente6c64af8be89374ed318ed1a395ead7cd00a6753 (diff)
downloadNetworkManager-ff434af2c5eceb7ebc2aaffb154ceb39f7b857bb.tar.gz
device: fix a crash when VLAN fails to realize
Program received signal SIGSEGV, Segmentation fault. 0x0000555555646b59 in platform_link_added (self=self@entry=0x5555559fe1d0, ifindex=<optimized out>, plink=plink@entry=0x555555b10a70) at nm-manager.c:1889 1889 nm_log_warn (LOGD_HW, "%s: factory failed to create device: %s", (gdb) bt #0 0x0000555555646b59 in platform_link_added (self=self@entry=0x5555559fe1d0, ifindex=<optimized out>, plink=plink@entry=0x555555b10a70) at nm-manager.c:1889 #1 0x000055555564980c in nm_manager_start (self=0x5555559fe1d0) at nm-manager.c:1988 #2 0x000055555564980c in nm_manager_start (self=0x5555559fe1d0, error=error@entry=0x7fffffffe658) at nm-manager.c:4212 #3 0x00005555555ae173 in main (argc=1, argv=0x7fffffffe7c8) at main.c:428 (gdb)
Diffstat (limited to 'src')
-rw-r--r--src/devices/nm-device-vlan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c
index a4117f03a6..59c2e47ce3 100644
--- a/src/devices/nm-device-vlan.c
+++ b/src/devices/nm-device-vlan.c
@@ -155,6 +155,8 @@ realize (NMDevice *device,
parent = nm_manager_get_device_by_ifindex (nm_manager_get (), parent_ifindex);
if (!parent) {
nm_log_dbg (LOGD_HW, "(%s): VLAN parent interface unknown", plink->name);
+ g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED,
+ "(%s): VLAN parent interface unknown", plink->name);
return FALSE;
}
} else