Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753613AbbBQXqR (ORCPT ); Tue, 17 Feb 2015 18:46:17 -0500 Received: from mout.gmx.net ([212.227.15.19]:49974 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbbBQXqQ (ORCPT ); Tue, 17 Feb 2015 18:46:16 -0500 Message-ID: <54E3D2BE.30305@gmx.de> Date: Wed, 18 Feb 2015 00:46:06 +0100 From: Lino Sanfilippo User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Matthew Thode , davem@davemloft.net CC: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] colons are invalid characters in netdev names References: <1424214942-17581-1-git-send-email-mthode@mthode.org> In-Reply-To: <1424214942-17581-1-git-send-email-mthode@mthode.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:6oKO+qS2D/YHV5tfPb0Md7Z5EyCgk40Zgf6yzFsR7wvLfXQ4VGu FcdWqndV3BQ2hC6iWa3eT2x+Y6IEPOp9bQ+mLRlNTQQ9isIU0tp2IDyEr4HiLOyBiNRiYZv ijMyL0j/RfJM3ebMu7P/es1ruNGxtezu7GIoVxoDTMhTkr1Yn1ULGlQci+S4EVqdyMEct/y 2S61aJo2iw8YUgvKc7qiQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1069 Lines: 36 On 18.02.2015 00:15, Matthew Thode wrote: > 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 > --- > 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) { > Hi, that check should be done in the loop below, shouldn't it? Regards, Lino -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/