❦ 14 juillet 2018 21:54 +0300, Serhey Popovych :
> We should leave only filter.label check and return 0:
>
> if (filter.label)
> return 0;
>
> This will ensure we exit from print_linkinfo() earlier, skip
> print_link_stats() and push final filtering by label to
> print_selected_a
Serhey Popovych wrote:
> Vincent Bernat wrote:
>> ❦ 11 juillet 2018 21:01 -0400, David Ahern :
>>
+++ b/ip/ipaddress.c
@@ -837,11 +837,6 @@ int print_linkinfo(const struct sockaddr_nl *who,
if (!name)
return -1;
- if (filter.label &&
- (!fi
Vincent Bernat wrote:
> ❦ 11 juillet 2018 21:01 -0400, David Ahern :
>
>>> +++ b/ip/ipaddress.c
>>> @@ -837,11 +837,6 @@ int print_linkinfo(const struct sockaddr_nl *who,
>>> if (!name)
>>> return -1;
>>>
>>> - if (filter.label &&
>>> - (!filter.family || filter.family
❦ 11 juillet 2018 21:01 -0400, David Ahern :
>> +++ b/ip/ipaddress.c
>> @@ -837,11 +837,6 @@ int print_linkinfo(const struct sockaddr_nl *who,
>> if (!name)
>> return -1;
>>
>> -if (filter.label &&
>> -(!filter.family || filter.family == AF_PACKET) &&
>> -
On 7/11/18 7:36 AM, Vincent Bernat wrote:
> diff --git a/ip/ipaddress.c b/ip/ipaddress.c
> index 5009bfe6d2e3..20ef6724944e 100644
> --- a/ip/ipaddress.c
> +++ b/ip/ipaddress.c
> @@ -837,11 +837,6 @@ int print_linkinfo(const struct sockaddr_nl *who,
> if (!name)
> return -1;
>
❦ 11 juillet 2018 13:03 -0700, Stephen Hemminger :
>> Since 9516823051ce, "ip addr show label lo:1" doesn't work
>> anymore (doesn't show any address, despite a matching label).
>> Reverting to return 0 instead of -1 fix the issue.
>>
>> However, the condition says: "if we filter by label [...]
On Wed, 11 Jul 2018 13:36:03 +0200
Vincent Bernat wrote:
> Since 9516823051ce, "ip addr show label lo:1" doesn't work
> anymore (doesn't show any address, despite a matching label).
> Reverting to return 0 instead of -1 fix the issue.
>
> However, the condition says: "if we filter by label [...]
Since 9516823051ce, "ip addr show label lo:1" doesn't work
anymore (doesn't show any address, despite a matching label).
Reverting to return 0 instead of -1 fix the issue.
However, the condition says: "if we filter by label [...] and the
label does NOT match the interface name". This makes little