lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 31 Jul 2017 15:31:32 +1200
From:   Xin Long <lucien.xin@...il.com>
To:     David Ahern <dsahern@...il.com>
Cc:     network dev <netdev@...r.kernel.org>, davem <davem@...emloft.net>,
        Mantas Mikulėnas <grawity@...il.com>
Subject: Re: [PATCH net] ipv6: set fc_protocol with 0 when rtm_protocol is RTPROT_REDIRECT

On Mon, Jul 31, 2017 at 2:35 PM, David Ahern <dsahern@...il.com> wrote:
> On 7/30/17 6:51 AM, Xin Long wrote:
>> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
>> index 4d30c96..187580f 100644
>> --- a/net/ipv6/route.c
>> +++ b/net/ipv6/route.c
>> @@ -2912,9 +2912,11 @@ static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,
>>       cfg->fc_dst_len = rtm->rtm_dst_len;
>>       cfg->fc_src_len = rtm->rtm_src_len;
>>       cfg->fc_flags = RTF_UP;
>> -     cfg->fc_protocol = rtm->rtm_protocol;
>>       cfg->fc_type = rtm->rtm_type;
>>
>> +     if (rtm->rtm_protocol != RTPROT_REDIRECT)
>> +             cfg->fc_protocol = rtm->rtm_protocol;
>> +
>>       if (rtm->rtm_type == RTN_UNREACHABLE ||
>>           rtm->rtm_type == RTN_BLACKHOLE ||
>>           rtm->rtm_type == RTN_PROHIBIT ||
Hi, David
>
> Did you look at removing this hunk from rt6_fill_node:
>
>         if (rt->rt6i_flags & RTF_DYNAMIC)
>                 rtm->rtm_protocol = RTPROT_REDIRECT;
>         else if (rt->rt6i_flags & RTF_ADDRCONF) {
>                 if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ROUTEINFO))
>                         rtm->rtm_protocol = RTPROT_RA;
>                 else
>                         rtm->rtm_protocol = RTPROT_KERNEL;
>         }
The issue seems to affect "ip -6 route flush all" as well, not only cache
since 'else if {}' also  causes rtm proto being different from rt6 proto.

>
> And have rtm_protocol set properly on the route when it is installed?
The codes not keeping rtm proto consistent with rt6 proto day 1,
any idea on why it didn't use rt6 proto in kernel properly?

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ