summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-11-08 09:17:08 -0500
committerDave Reisner <dreisner@archlinux.org>2013-11-08 09:25:19 -0500
commitda66338e17f4df04d9d7cc22ec971b416d57761e (patch)
tree13c674d07a394d47e48c2569c6d9f607bcbba19f /src
parenta9616cd17fb0a57ac92d39e1ad261caa1039d7b1 (diff)
link-config: match length for kernel commandline option
This prevents enable_name_policy() from invariably returning false when it matches a zero length string at the end of /proc/cmdline.
Diffstat (limited to 'src')
-rw-r--r--src/udev/net/link-config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 726945816d..cb4af143dc 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -202,7 +202,7 @@ static bool enable_name_policy(void) {
return true;
FOREACH_WORD_QUOTED(w, l, line, state)
- if (strneq(w, "net.ifnames=0", l))
+ if (l == sizeof("net.ifnames=0") - 1 && strneq(w, "net.ifnames=0", l))
return false;
return true;