From: Matthew Thode Date: Wed, 18 Feb 2015 00:31:57 +0000 (-0600) Subject: net: reject creation of netdev names with colons X-Git-Tag: v3.2.69~27 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=d501ebeb7da7531e92e3c8d194730341c314ff2d 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 Signed-off-by: David S. Miller [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- 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++; }