Skip to content

Commit e37791e

Browse files
David Aherndavem330
authored andcommitted
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: 0189197 ("mpls: Basic routing support") Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 52491c7 commit e37791e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/mpls/af_mpls.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,7 @@ static void mpls_net_exit(struct net *net)
20282028
for (index = 0; index < platform_labels; index++) {
20292029
struct mpls_route *rt = rtnl_dereference(platform_label[index]);
20302030
RCU_INIT_POINTER(platform_label[index], NULL);
2031+
mpls_notify_route(net, index, rt, NULL, NULL);
20312032
mpls_rt_free(rt);
20322033
}
20332034
rtnl_unlock();

0 commit comments

Comments
 (0)