aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Thode <mthode@mthode.org>2015-02-17 18:31:57 -0600
committerStefan Bader <stefan.bader@canonical.com>2015-05-29 11:54:16 +0200
commitfcda7e34df402d013774a4c6c064b5ec44e3a81b (patch)
tree42b97db7d4fc2945e0a31e22d4ebabd3af74d2d2
parent1f889821ccb9887eff444a9339be67b0e40da9be (diff)
downloadlinux-2.6.32.y-drm33.z-fcda7e34df402d013774a4c6c064b5ec44e3a81b.tar.gz
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> (cherry picked from commit d501ebeb7da7531e92e3c8d194730341c314ff2d) Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
-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 d25044459af0c..0767b17593e28 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -779,7 +779,7 @@ int dev_valid_name(const char *name)
return 0;
while (*name) {
- if (*name == '/' || isspace(*name))
+ if (*name == '/' || *name == ':' || isspace(*name))
return 0;
name++;
}