Commit d501ebeb authored by Matthew Thode's avatar Matthew Thode Committed by Ben Hutchings

net: reject creation of netdev names with colons

[ Upstream commit a4176a93 ]

colons are used as a separator in netdev device lookup in dev_ioctl.c

Specific functions are SIOCGIFTXQLEN SIOCETHTOOL SIOCSIFNAME
Signed-off-by: default avatarMatthew Thode <mthode@mthode.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 9405be73
......@@ -859,7 +859,7 @@ int dev_valid_name(const char *name)
return 0;
while (*name) {
if (*name == '/' || isspace(*name))
if (*name == '/' || *name == ':' || isspace(*name))
return 0;
name++;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment