lkml.org 
[lkml]   [2015]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] colons are invalid characters in netdev names
Date
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>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index d030575..e9b6d5a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -942,7 +942,7 @@ bool dev_valid_name(const char *name)
return false;
if (strlen(name) >= IFNAMSIZ)
return false;
- if (!strcmp(name, ".") || !strcmp(name, ".."))
+ if (!strcmp(name, ".") || !strcmp(name, "..") || !strcmp(name, ":"))
return false;

while (*name) {
--
2.0.5


\
 
 \ /
  Last update: 2015-02-18 00:41    [W:0.031 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site