aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/reassembly.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 7e008de87117..130d6f6b6a6e 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -750,7 +750,9 @@ int __init ipv6_frag_init(void)
750 if (ret) 750 if (ret)
751 goto out; 751 goto out;
752 752
753 register_pernet_subsys(&ip6_frags_ops); 753 ret = register_pernet_subsys(&ip6_frags_ops);
754 if (ret)
755 goto err_pernet;
754 756
755 ip6_frags.hashfn = ip6_hashfn; 757 ip6_frags.hashfn = ip6_hashfn;
756 ip6_frags.constructor = ip6_frag_init; 758 ip6_frags.constructor = ip6_frag_init;
@@ -763,6 +765,10 @@ int __init ipv6_frag_init(void)
763 inet_frags_init(&ip6_frags); 765 inet_frags_init(&ip6_frags);
764out: 766out:
765 return ret; 767 return ret;
768
769err_pernet:
770 inet6_del_protocol(&frag_protocol, IPPROTO_FRAGMENT);
771 goto out;
766} 772}
767 773
768void ipv6_frag_exit(void) 774void ipv6_frag_exit(void)