summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6mr.c
diff options
context:
space:
mode:
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>2014-11-19 09:35:39 +0800
committerDavid S. Miller <davem@davemloft.net>2014-11-19 16:56:17 -0500
commitffb1388a364d135810337182d6800a0c7ee44f48 (patch)
tree84886bfc3c910d2040274f4cd8cfca470f2bac64 /net/ipv6/ip6mr.c
parentddecab1abc97b45168599a52c334a7f9910d5a5a (diff)
downloadlinux-stable-ffb1388a364d135810337182d6800a0c7ee44f48.tar.gz
linux-stable-ffb1388a364d135810337182d6800a0c7ee44f48.tar.bz2
linux-stable-ffb1388a364d135810337182d6800a0c7ee44f48.zip
ipv6: delete protocol and unregister rtnetlink when cleanup
pim6_protocol was added when initiation, but it not deleted. Similarly, unregister RTNL_FAMILY_IP6MR rtnetlink. Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Reviewed-by: Cong Wang <cwang@twopensource.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6mr.c')
-rw-r--r--net/ipv6/ip6mr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 0171f08325c3..1a01d79b8698 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1439,6 +1439,10 @@ reg_pernet_fail:
void ip6_mr_cleanup(void)
{
+ rtnl_unregister(RTNL_FAMILY_IP6MR, RTM_GETROUTE);
+#ifdef CONFIG_IPV6_PIMSM_V2
+ inet6_del_protocol(&pim6_protocol, IPPROTO_PIM);
+#endif
unregister_netdevice_notifier(&ip6_mr_notifier);
unregister_pernet_subsys(&ip6mr_net_ops);
kmem_cache_destroy(mrt_cachep);