Re: [PATCH net v2] net: enable interface alias removal via rtnl

2017-10-11 Thread David Ahern
On 10/11/17 6:29 AM, Nicolas Dichtel wrote: > Le 10/10/2017 à 16:50, David Ahern a écrit : >> On 10/10/17 6:41 AM, Nicolas Dichtel wrote: >>> IFLA_IFALIAS is defined as NLA_STRING. It means that the minimal length of >>> the attribute is 1 ("\0"). However, to remove an alias, the attribute >>> leng

Re: [PATCH net v2] net: enable interface alias removal via rtnl

2017-10-11 Thread Nicolas Dichtel
Le 10/10/2017 à 16:50, David Ahern a écrit : > On 10/10/17 6:41 AM, Nicolas Dichtel wrote: >> IFLA_IFALIAS is defined as NLA_STRING. It means that the minimal length of >> the attribute is 1 ("\0"). However, to remove an alias, the attribute >> length must be 0 (see dev_set_alias()). >> >> Let's de

Re: [PATCH net v2] net: enable interface alias removal via rtnl

2017-10-10 Thread David Ahern
On 10/10/17 6:41 AM, Nicolas Dichtel wrote: > IFLA_IFALIAS is defined as NLA_STRING. It means that the minimal length of > the attribute is 1 ("\0"). However, to remove an alias, the attribute > length must be 0 (see dev_set_alias()). > > Let's define the type to NLA_BINARY, so that the alias can

[PATCH net v2] net: enable interface alias removal via rtnl

2017-10-10 Thread Nicolas Dichtel
IFLA_IFALIAS is defined as NLA_STRING. It means that the minimal length of the attribute is 1 ("\0"). However, to remove an alias, the attribute length must be 0 (see dev_set_alias()). Let's define the type to NLA_BINARY, so that the alias can be removed. Example: $ ip l s dummy0 alias foo $ ip l