From da66338e17f4df04d9d7cc22ec971b416d57761e Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 8 Nov 2013 09:17:08 -0500 Subject: 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. --- src/udev/net/link-config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-54-g00ecf