lkml.org 
[lkml]   [2022]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Generate netlink notification when default IPv6 route preference changes
From
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.

\
 
 \ /
  Last update: 2022-02-10 19:20    [W:0.063 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site