summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2017-03-10 09:46:15 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-22 12:04:16 +0100
commitb57955ea30e13aa37e5955bf20617f839f32c560 (patch)
tree86f43fb1a2d1ebafe86b00551c04cf683ab9ff4c /net
parent710fbeb3f5c5441fbe002b2c1566ceaad0725c01 (diff)
downloadlinux-stable-b57955ea30e13aa37e5955bf20617f839f32c560.tar.gz
linux-stable-b57955ea30e13aa37e5955bf20617f839f32c560.tar.bz2
linux-stable-b57955ea30e13aa37e5955bf20617f839f32c560.zip
mpls: Send route delete notifications when router module is unloaded
[ Upstream commit e37791ec1ad785b59022ae211f63a16189bacebf ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/mpls/af_mpls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index 881bc2072809..52cfc4478511 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -1567,6 +1567,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();