From: Matthew Thode Date: Wed, 18 Feb 2015 00:31:57 +0000 (-0600) Subject: net: reject creation of netdev names with colons X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a4176a9391868bfa87705bcd2e3b49e9b9dd2996;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 8f9710c62e20..962ee9d71964 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -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++; }