From da66338e17f4df04d9d7cc22ec971b416d57761e Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 8 Nov 2013 09:17:08 -0500 Subject: [PATCH] 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 726945816..cb4af143d 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; -- 2.30.2