Re: [PATCH][V2] ipv6: fix incorrect bitwise operator used on rt6i_flags

From: David Miller
Date: Tue Oct 10 2017 - 15:24:38 EST


From: Wei Wang <tracywwnj@xxxxxxxxx>
Date: Tue, 10 Oct 2017 11:38:20 -0700

> On Tue, Oct 10, 2017 at 11:10 AM, Colin King <colin.king@xxxxxxxxxxxxx> wrote:
>> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>>
>> The use of the | operator always leads to true which looks rather
>> suspect to me. Fix this by using & instead to just check the
>> RTF_CACHE entry bit.
>>
>> Detected by CoverityScan, CID#1457734, #1457747 ("Wrong operator used")
>>
>> Fixes: 35732d01fe31 ("ipv6: introduce a hash table to store dst cache")
>> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>> ---
>
> Acked-by: Wei Wang <weiwan@xxxxxxxxxx>

Applied, thanks everyone.