netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mpls: Send route delete notifications when router module is unloaded
@ 2017-03-10 17:46 David Ahern
  2017-03-13  6:40 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2017-03-10 17:46 UTC (permalink / raw)
  To: netdev; +Cc: ebiederm, roopa, rshearma, David Ahern

When the mpls_router module is unloaded, mpls routes are deleted but
notifications are not sent to userspace leaving userspace caches
out of sync. Add the call to mpls_notify_route in mpls_net_exit as
routes are freed.

Fixes: 0189197f44160 ("mpls: Basic routing support")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
 net/mpls/af_mpls.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index 3818686182b2..a1477989ed0b 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -2028,6 +2028,7 @@ static void mpls_net_exit(struct net *net)
 	for (index = 0; index < platform_labels; index++) {
 		struct mpls_route *rt = rtnl_dereference(platform_label[index]);
 		RCU_INIT_POINTER(platform_label[index], NULL);
+		mpls_notify_route(net, index, rt, NULL, NULL);
 		mpls_rt_free(rt);
 	}
 	rtnl_unlock();
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mpls: Send route delete notifications when router module is unloaded
  2017-03-10 17:46 [PATCH] mpls: Send route delete notifications when router module is unloaded David Ahern
@ 2017-03-13  6:40 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-13  6:40 UTC (permalink / raw)
  To: dsa; +Cc: netdev, ebiederm, roopa, rshearma

From: David Ahern <dsa@cumulusnetworks.com>
Date: Fri, 10 Mar 2017 09:46:15 -0800

> When the mpls_router module is unloaded, mpls routes are deleted but
> notifications are not sent to userspace leaving userspace caches
> out of sync. Add the call to mpls_notify_route in mpls_net_exit as
> routes are freed.
> 
> Fixes: 0189197f44160 ("mpls: Basic routing support")
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>

Applied and queued up for -stable.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-13  6:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 17:46 [PATCH] mpls: Send route delete notifications when router module is unloaded David Ahern
2017-03-13  6:40 ` 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).