* [PATCH net] ipv6: include NLM_F_REPLACE in route replace notifications
@ 2015-09-13 17:18 Roopa Prabhu
2015-09-14 7:52 ` Nicolas Dichtel
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Roopa Prabhu @ 2015-09-13 17:18 UTC (permalink / raw)
To: davem
Cc: nicolas.dichtel, mkubecek, Mazziesaccount, hannes, kuznet,
jmorris, yoshfuji, netdev
From: Roopa Prabhu <roopa@cumulusnetworks.com>
This patch adds NLM_F_REPLACE flag to ipv6 route replace notifications.
This makes nlm_flags in ipv6 replace notifications consistent
with ipv4.
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
Submitting this to net since it complements the other ipv6 replace fixes
in net
include/net/ip6_fib.h | 3 ++-
net/ipv6/ip6_fib.c | 6 +++---
net/ipv6/route.c | 5 +++--
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 063d304..aaf9700 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -275,7 +275,8 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt,
struct nl_info *info, struct mx6_config *mxc);
int fib6_del(struct rt6_info *rt, struct nl_info *info);
-void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info);
+void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info,
+ unsigned int flags);
void fib6_run_gc(unsigned long expires, struct net *net, bool force);
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 418d982..90ff99b 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -846,7 +846,7 @@ add:
*ins = rt;
rt->rt6i_node = fn;
atomic_inc(&rt->rt6i_ref);
- inet6_rt_notify(RTM_NEWROUTE, rt, info);
+ inet6_rt_notify(RTM_NEWROUTE, rt, info, 0);
info->nl_net->ipv6.rt6_stats->fib_rt_entries++;
if (!(fn->fn_flags & RTN_RTINFO)) {
@@ -872,7 +872,7 @@ add:
rt->rt6i_node = fn;
rt->dst.rt6_next = iter->dst.rt6_next;
atomic_inc(&rt->rt6i_ref);
- inet6_rt_notify(RTM_NEWROUTE, rt, info);
+ inet6_rt_notify(RTM_NEWROUTE, rt, info, NLM_F_REPLACE);
if (!(fn->fn_flags & RTN_RTINFO)) {
info->nl_net->ipv6.rt6_stats->fib_route_nodes++;
fn->fn_flags |= RTN_RTINFO;
@@ -1410,7 +1410,7 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp,
fib6_purge_rt(rt, fn, net);
- inet6_rt_notify(RTM_DELROUTE, rt, info);
+ inet6_rt_notify(RTM_DELROUTE, rt, info, 0);
rt6_release(rt);
}
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 53617d7..783d416 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -3303,7 +3303,8 @@ errout:
return err;
}
-void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info)
+void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info,
+ unsigned int nlm_flags)
{
struct sk_buff *skb;
struct net *net = info->nl_net;
@@ -3318,7 +3319,7 @@ void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info)
goto errout;
err = rt6_fill_node(net, skb, rt, NULL, NULL, 0,
- event, info->portid, seq, 0, 0, 0);
+ event, info->portid, seq, 0, 0, nlm_flags);
if (err < 0) {
/* -EMSGSIZE implies BUG in rt6_nlmsg_size() */
WARN_ON(err == -EMSGSIZE);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] ipv6: include NLM_F_REPLACE in route replace notifications
2015-09-13 17:18 [PATCH net] ipv6: include NLM_F_REPLACE in route replace notifications Roopa Prabhu
@ 2015-09-14 7:52 ` Nicolas Dichtel
2015-09-14 8:44 ` Michal Kubecek
2015-09-17 22:00 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2015-09-14 7:52 UTC (permalink / raw)
To: Roopa Prabhu, davem
Cc: mkubecek, Mazziesaccount, hannes, kuznet, jmorris, yoshfuji,
netdev
Le 13/09/2015 19:18, Roopa Prabhu a écrit :
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
> This patch adds NLM_F_REPLACE flag to ipv6 route replace notifications.
> This makes nlm_flags in ipv6 replace notifications consistent
> with ipv4.
>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] ipv6: include NLM_F_REPLACE in route replace notifications
2015-09-13 17:18 [PATCH net] ipv6: include NLM_F_REPLACE in route replace notifications Roopa Prabhu
2015-09-14 7:52 ` Nicolas Dichtel
@ 2015-09-14 8:44 ` Michal Kubecek
2015-09-17 22:00 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Michal Kubecek @ 2015-09-14 8:44 UTC (permalink / raw)
To: Roopa Prabhu
Cc: davem, nicolas.dichtel, Mazziesaccount, hannes, kuznet, jmorris,
yoshfuji, netdev
On Sun, Sep 13, 2015 at 10:18:33AM -0700, Roopa Prabhu wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
> This patch adds NLM_F_REPLACE flag to ipv6 route replace notifications.
> This makes nlm_flags in ipv6 replace notifications consistent
> with ipv4.
>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] ipv6: include NLM_F_REPLACE in route replace notifications
2015-09-13 17:18 [PATCH net] ipv6: include NLM_F_REPLACE in route replace notifications Roopa Prabhu
2015-09-14 7:52 ` Nicolas Dichtel
2015-09-14 8:44 ` Michal Kubecek
@ 2015-09-17 22:00 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-09-17 22:00 UTC (permalink / raw)
To: roopa
Cc: nicolas.dichtel, mkubecek, Mazziesaccount, hannes, kuznet,
jmorris, yoshfuji, netdev
From: Roopa Prabhu <roopa@cumulusnetworks.com>
Date: Sun, 13 Sep 2015 10:18:33 -0700
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
> This patch adds NLM_F_REPLACE flag to ipv6 route replace notifications.
> This makes nlm_flags in ipv6 replace notifications consistent
> with ipv4.
>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
> ---
> Submitting this to net since it complements the other ipv6 replace fixes
> in net
Applied, thanks Roopa.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-17 22:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-13 17:18 [PATCH net] ipv6: include NLM_F_REPLACE in route replace notifications Roopa Prabhu
2015-09-14 7:52 ` Nicolas Dichtel
2015-09-14 8:44 ` Michal Kubecek
2015-09-17 22:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).