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.
This commit is contained in:
Dave Reisner 2013-11-08 09:17:08 -05:00
parent a9616cd17f
commit da66338e17

View file

@ -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;