summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-04 23:05:26 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-04 23:05:26 +0200
commit2cd666f8c93d2fc27566bd16f21fba1043735729 (patch)
treebc5e85b0f0a6f864f1e0c284d4fde05a39f61c7f /src
parent59b8f6b628145586e87b8a4f6e29c755ad7d61ed (diff)
sd-network: actually open the state file in sd_network_get_llmnr()
Diffstat (limited to 'src')
-rw-r--r--src/network/sd-network.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/sd-network.c b/src/network/sd-network.c
index a0f147e023..260ca470d1 100644
--- a/src/network/sd-network.c
+++ b/src/network/sd-network.c
@@ -114,6 +114,9 @@ _public_ int sd_network_get_llmnr(int ifindex, char **llmnr) {
assert_return(ifindex > 0, -EINVAL);
assert_return(llmnr, -EINVAL);
+ if (asprintf(&p, "/run/systemd/netif/links/%d", ifindex) < 0)
+ return -ENOMEM;
+
r = parse_env_file(p, NEWLINE, "LLMNR", &s, NULL);
if (r == -ENOENT)
return -ENODATA;