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] [day] [month] [year] [list]
Message-ID: <e867c94f-b817-b520-6d98-1e410df978a7@gmail.com>
Date:   Thu, 10 Feb 2022 10:19:25 -0800
From:   David Ahern <dsahern@...il.com>
To:     Kalash Nainwal <kalash@...sta.com>, netdev@...r.kernel.org
Cc:     fruggeri@...sta.com, "David S. Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Jakub Kicinski <kuba@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Generate netlink notification when default IPv6 route
 preference changes

On 2/9/22 12:38 PM, Kalash Nainwal wrote:
> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> index f03b597e4121..fd14f5b1c767 100644
> --- a/net/ipv6/ndisc.c
> +++ b/net/ipv6/ndisc.c
> @@ -1337,8 +1337,12 @@ static void ndisc_router_discovery(struct sk_buff *skb)
>  			return;
>  		}
>  		neigh->flags |= NTF_ROUTER;
> -	} else if (rt) {
> +	} else if (rt && IPV6_EXTRACT_PREF(rt->fib6_flags) != pref) {
> +		struct nl_info nlinfo = {
> +			.nl_net = net,
> +		};
>  		rt->fib6_flags = (rt->fib6_flags & ~RTF_PREF_MASK) | RTF_PREF(pref);
> +		inet6_rt_notify(RTM_NEWROUTE, rt, &nlinfo, NLM_F_CREATE);
>  	}
>  
>  	if (rt)

route exists, but the flags are updated so that should be NLM_F_REPLACE.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ