diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2017-03-10 12:46:15 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-13 02:39:32 -0400 |
commit | e37791ec1ad785b59022ae211f63a16189bacebf (patch) | |
tree | c3fbc1b1c9570aae6afaf6ed6b949e365c8dd5fa | |
parent | 52491c7607c5527138095edf44c53169dc1ddb82 (diff) |
mpls: Send route delete notifications when router module is unloaded
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/mpls/af_mpls.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
2028 | for (index = 0; index < platform_labels; index++) { | 2028 | for (index = 0; index < platform_labels; index++) { |
2029 | struct mpls_route *rt = rtnl_dereference(platform_label[index]); | 2029 | struct mpls_route *rt = rtnl_dereference(platform_label[index]); |
2030 | RCU_INIT_POINTER(platform_label[index], NULL); | 2030 | RCU_INIT_POINTER(platform_label[index], NULL); |
2031 | mpls_notify_route(net, index, rt, NULL, NULL); | ||
2031 | mpls_rt_free(rt); | 2032 | mpls_rt_free(rt); |
2032 | } | 2033 | } |
2033 | rtnl_unlock(); | 2034 | rtnl_unlock(); |