diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-04 23:05:26 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-04 23:05:26 +0200 |
commit | 2cd666f8c93d2fc27566bd16f21fba1043735729 (patch) | |
tree | bc5e85b0f0a6f864f1e0c284d4fde05a39f61c7f /src/network/sd-network.c | |
parent | 59b8f6b628145586e87b8a4f6e29c755ad7d61ed (diff) |
sd-network: actually open the state file in sd_network_get_llmnr()
Diffstat (limited to 'src/network/sd-network.c')
-rw-r--r-- | src/network/sd-network.c | 3 |
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; |