Skip to content

Commit b57955e

Browse files
David Aherngregkh
authored andcommitted
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: 0189197 ("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>
1 parent 710fbeb commit b57955e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

net/mpls/af_mpls.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,7 @@ static void mpls_net_exit(struct net *net)
15671567
for (index = 0; index < platform_labels; index++) {
15681568
struct mpls_route *rt = rtnl_dereference(platform_label[index]);
15691569
RCU_INIT_POINTER(platform_label[index], NULL);
1570+
mpls_notify_route(net, index, rt, NULL, NULL);
15701571
mpls_rt_free(rt);
15711572
}
15721573
rtnl_unlock();

0 commit comments

Comments
 (0)