Re: [PATCH iproute2-next] ipaddress: fix label matching

2018-07-14 Thread Vincent Bernat
❦ 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 >

Re: [PATCH iproute2-next] ipaddress: fix label matching

2018-07-14 Thread Serhey Popovych
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 && -

Re: [PATCH iproute2-next] ipaddress: fix label matching

2018-07-14 Thread Serhey Popovych
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

Re: [PATCH iproute2-next] ipaddress: fix label matching

2018-07-11 Thread Vincent Bernat
❦ 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) && >> -

Re: [PATCH iproute2-next] ipaddress: fix label matching

2018-07-11 Thread David Ahern
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; >

Re: [PATCH iproute2-next] ipaddress: fix label matching

2018-07-11 Thread Vincent Bernat
❦ 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

Re: [PATCH iproute2-next] ipaddress: fix label matching

2018-07-11 Thread Stephen Hemminger
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

[PATCH iproute2-next] ipaddress: fix label matching

2018-07-11 Thread Vincent Bernat
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