Skip to content

Commit

Permalink
mpls: Send route delete notifications when router module is unloaded
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
David Ahern authored and davem330 committed Mar 13, 2017
1 parent 52491c7 commit e37791e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/mpls/af_mpls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e37791e

Please sign in to comment.