[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3sh4p3uto.fsf@luffy.cx>
Date: Thu, 12 Jul 2018 07:08:03 +0200
From: Vincent Bernat <vincent@...nat.im>
To: David Ahern <dsahern@...il.com>
Cc: netdev@...r.kernel.org, stephen@...workplumber.org,
serhe.popovych@...il.com
Subject: Re: [PATCH iproute2-next] ipaddress: fix label matching
❦ 11 juillet 2018 21:01 -0400, David Ahern <dsahern@...il.com> :
>> +++ 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) &&
>> - fnmatch(filter.label, name, 0))
>> - return -1;
>> -
>
> The offending commit changed the return code:
>
> if (filter.label &&
> (!filter.family || filter.family == AF_PACKET) &&
> - fnmatch(filter.label, RTA_DATA(tb[IFLA_IFNAME]), 0))
> - return 0;
> + fnmatch(filter.label, name, 0))
> + return -1;
>
>
> Vincent: can you try leaving the code as is, but change the return to 0?
Yes, it works by just returning 0. The code still doesn't make sense.
--
Many pages make a thick book, except for pocket Bibles which are on very
very thin paper.
Powered by blists - more mailing lists