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:
parent
a9616cd17f
commit
da66338e17
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue