Browse Source

net: reject creation of netdev names with colons

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>
Matthew Thode 10 years ago
parent
commit
a4176a9391
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/core/dev.c

+ 1 - 1
net/core/dev.c

@@ -946,7 +946,7 @@ bool dev_valid_name(const char *name)
 		return false;
 		return false;
 
 
 	while (*name) {
 	while (*name) {
-		if (*name == '/' || isspace(*name))
+		if (*name == '/' || *name == ':' || isspace(*name))
 			return false;
 			return false;
 		name++;
 		name++;
 	}
 	}