]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: reject creation of netdev names with colons
authorMatthew Thode <mthode@mthode.org>
Wed, 18 Feb 2015 00:31:57 +0000 (18:31 -0600)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Feb 2015 02:45:25 +0000 (21:45 -0500)
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>
net/core/dev.c

index 8f9710c62e20d58bcdcec3d184ca6344fbe5a57c..962ee9d719641291853715f366717bf1626e115c 100644 (file)
@@ -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++;
        }