Commit 05340587 authored by Martin Pitt's avatar Martin Pitt
Browse files

Cherry-pick upstream patch to fix udev crash in link_config_get()

parent 9f541fe7
systemd (215-6) UNRELEASED; urgency=medium
* Cherry-pick upstream patch to fix udev crash in link_config_get().
-- Martin Pitt <mpitt@debian.org> Sun, 12 Oct 2014 17:29:00 +0200
systemd (215-5) unstable; urgency=medium systemd (215-5) unstable; urgency=medium
[ Martin Pitt ] [ Martin Pitt ]
......
...@@ -105,6 +105,7 @@ parse_boolean-require-exact-matches.patch ...@@ -105,6 +105,7 @@ parse_boolean-require-exact-matches.patch
sd-journal-properly-convert-object-size-on-big-endia.patch sd-journal-properly-convert-object-size-on-big-endia.patch
always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch
timesyncd-when-we-don-t-know-anything-about-the-netw.patch timesyncd-when-we-don-t-know-anything-about-the-netw.patch
udev-link-config-fix-crash-due-to-missing-hwaddr.patch
## Debian specific patches: ## Debian specific patches:
Add-back-support-for-Debian-specific-config-files.patch Add-back-support-for-Debian-specific-config-files.patch
......
From: Tom Gundersen <teg@jklm.no>
Date: Thu, 14 Aug 2014 01:35:16 +0200
Subject: udev: link-config - fix crash due to missing hwaddr
Reported by: master.nosferatu@gmail.com
---
src/udev/net/link-config.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index f93998a..2778b74 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -247,11 +247,12 @@ int link_config_get(link_config_ctx *ctx, struct udev_device *device, link_confi
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"),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment