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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9fcbffcb-4a14-764c-7fe4-2108b8944c17@gmail.com>
Date:   Sun, 30 Jul 2017 20:35:08 -0600
From:   David Ahern <dsahern@...il.com>
To:     Xin Long <lucien.xin@...il.com>,
        network dev <netdev@...r.kernel.org>
Cc:     davem@...emloft.net, grawity@...il.com
Subject: Re: [PATCH net] ipv6: set fc_protocol with 0 when rtm_protocol is
 RTPROT_REDIRECT

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 ||

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;
        }

And have rtm_protocol set properly on the route when it is installed?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ