Skip to contentSkip to conversation

reject creation of netdev names with colons

PATCH In review Matthew Thode 2 participants 2 messages Feb 18, 2015 – Feb 22, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 net/core/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/dev.c +1 -1
index d030575..efbad386 100644
@@ -946,7 +946,7 @@ bool dev_valid_name(const char *name)
 		return false;
 
 	while (*name) {
-		if (*name == '/' || isspace(*name))
+		if (*name == '/' || *name == ':' || isspace(*name))
 			return false;
 		name++;
 	}
Signature · 1 line
2.0.5
maintainer
#1 lore raw

From: Matthew Thode <[email protected]>
Date: Tue, 17 Feb 2015 18:31:57 -0600

Quoted 5 lines

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

Specific functions are SIOCGIFTXQLEN SIOCETHTOOL SIOCSIFNAME

Applied thanks.

Please put a proper subsystem prefix in your Subject line for future patches. In this case an appropriate prefix would have been "net: reject..."