diff options
author | Matthew Thode <mthode@mthode.org> | 2015-02-17 18:31:57 -0600 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2015-05-24 10:10:46 +0200 |
commit | a7357ca5c20572ac9609a87be884f1e87bd28185 (patch) | |
tree | 2e9779bf54952728f8d61000c467934c848a6a9a | |
parent | 20914ec48a0bdce899c7a97a8ba720110a0ee9c5 (diff) | |
download | lwn-a7357ca5c20572ac9609a87be884f1e87bd28185.tar.gz lwn-a7357ca5c20572ac9609a87be884f1e87bd28185.zip |
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 <mthode@mthode.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
(cherry picked from commit d501ebeb7da7531e92e3c8d194730341c314ff2d)
Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index d25044459af0..0767b17593e2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -779,7 +779,7 @@ int dev_valid_name(const char *name) return 0; while (*name) { - if (*name == '/' || isspace(*name)) + if (*name == '/' || *name == ':' || isspace(*name)) return 0; name++; } |