summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-08-14 01:35:16 +0200
committerTom Gundersen <teg@jklm.no>2014-08-14 01:36:10 +0200
commiteb7040ec50fbfe5aad9eaf305bd442a4a235abaa (patch)
tree2551bb1d71ae8a6c60cbd0d86fd4cd05633bde93 /src/udev
parent2f8557eb3649840d76d9eb7d688a3c5c2922d31c (diff)
udev: link-config - fix crash due to missing hwaddr
Reported by: master.nosferatu@gmail.com
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/net/link-config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index e2280f1f6b..c2881d6b41 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -251,11 +251,12 @@ int link_config_get(link_config_ctx *ctx, struct udev_device *device,
link_config *link;
LIST_FOREACH(links, link, ctx->links) {
+ const char* attr_value = udev_device_get_sysattr_value(device, "address");
if (net_match_config(link->match_mac, link->match_path, link->match_driver,
link->match_type, NULL, link->match_host,
link->match_virt, link->match_kernel, link->match_arch,
- ether_aton(udev_device_get_sysattr_value(device, "address")),
+ attr_value ? ether_aton(attr_value) : NULL,
udev_device_get_property_value(device, "ID_PATH"),
udev_device_get_driver(udev_device_get_parent(device)),
udev_device_get_property_value(device, "ID_NET_DRIVER"),