summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMatthew Thode <mthode@mthode.org>2015-02-17 18:31:57 -0600
committerBen Hutchings <ben@decadent.org.uk>2015-05-09 23:16:37 +0100
commitd501ebeb7da7531e92e3c8d194730341c314ff2d (patch)
treeb9f9669a4706dd155feb1065960a207fb3e8556f /net
parent9405be73262273a6904688fb2f1e60a13117cf1b (diff)
net: reject creation of netdev names with colons
[ Upstream commit a4176a9391868bfa87705bcd2e3b49e9b9dd2996 ] colons are used as a separator in netdev device lookup in dev_ioctl.c Specific functions are SIOCGIFTXQLEN SIOCETHTOOL SIOCSIFNAME Signed-off-by: Matthew Thode <mthode@mthode.org> Signed-off-by: David S. Miller <davem@davemloft.net> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 81e5f559eeab..1c0d862b0b12 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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++;
}