summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMatthew Thode <mthode@mthode.org>2015-02-17 18:31:57 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-18 13:22:27 +0100
commitcde81ed79fc1540a3c3e775515d72f441aef8e6c (patch)
tree59234bc6b924db19c163f7b1a697fbc4d9ff70e0 /net
parentcae79d75dd639bca743b91d5532a09d90bc3492d (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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 c310440309bb..aeca8dd88b2a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -927,7 +927,7 @@ bool dev_valid_name(const char *name)
return false;
while (*name) {
- if (*name == '/' || isspace(*name))
+ if (*name == '/' || *name == ':' || isspace(*name))
return false;
name++;
}