Re: [PATCH] colons are invalid characters in netdev names
From: Matthew Thode
Date: Tue Feb 17 2015 - 18:57:27 EST
On 02/17/2015 05:46 PM, Lino Sanfilippo wrote:
> 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@xxxxxxxxxx>
>> ---
>> 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
>
You are correct, should I resend a patch. Not really sure the
procedure of updating a patchset sent to the ML.
--
Matthew Thode
Attachment:
signature.asc
Description: OpenPGP digital signature