Re: [PATCH] colons are invalid characters in netdev names

From: Matthew Thode
Date: Tue Feb 17 2015 - 20:33:41 EST


On 02/17/2015 07:28 PM, Stephen Hemminger wrote:
> On Tue, 17 Feb 2015 17:15:42 -0600
> Matthew Thode <mthode@xxxxxxxxxx> 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>
>
> What is the exact sequence that causes the problem?
> SIOCSIFNAME already strips of colon.
>
>
It strips the name one access, not creation. You can create a dummy
device and not access it, escaping doesn't seem to help.

ip link add name foo:asdasd type dummy
ip link del dev foo:asdasd # will not be deleted

--
Matthew Thode

Attachment: signature.asc
Description: OpenPGP digital signature