From: Lino Sanfilippo <LinoSanfilippo@gmx.de>
To: Matthew Thode <mthode@mthode.org>, davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] colons are invalid characters in netdev names
Date: Wed, 18 Feb 2015 00:46:06 +0100 [thread overview]
Message-ID: <54E3D2BE.30305@gmx.de> (raw)
In-Reply-To: <1424214942-17581-1-git-send-email-mthode@mthode.org>
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 <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) {
>
Hi,
that check should be done in the loop below, shouldn't it?
Regards,
Lino
next prev parent reply other threads:[~2015-02-17 23:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 23:15 [PATCH] colons are invalid characters in netdev names Matthew Thode
2015-02-17 23:46 ` Lino Sanfilippo [this message]
2015-02-17 23:57 ` Matthew Thode
2015-02-18 0:13 ` Lino Sanfilippo
2015-02-18 1:28 ` Stephen Hemminger
2015-02-18 1:33 ` Matthew Thode
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54E3D2BE.30305@gmx.de \
--to=linosanfilippo@gmx.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mthode@mthode.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).