From: David Ahern <dsahern@gmail.com>
To: Kalash Nainwal <kalash@arista.com>, netdev@vger.kernel.org
Cc: fruggeri@arista.com, "David S. Miller" <davem@davemloft.net>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
David Ahern <dsahern@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Generate netlink notification when default IPv6 route preference changes
Date: Thu, 10 Feb 2022 10:19:25 -0800 [thread overview]
Message-ID: <e867c94f-b817-b520-6d98-1e410df978a7@gmail.com> (raw)
In-Reply-To: <20220209203818.11351-1-kalash@arista.com>
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.
prev parent reply other threads:[~2022-02-10 18:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 20:38 Kalash Nainwal
2022-02-10 18:19 ` David Ahern [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e867c94f-b817-b520-6d98-1e410df978a7@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=fruggeri@arista.com \
--cc=kalash@arista.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®