mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
kernel: nf_conntrack_rtcache: fix WARNING on forward path
Fixesb7c58a1ee
("kernel: nf_conntrack_rtcache: fix cleanup on netns delete and rmmod") Resolves FS#2624 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> (cherry picked from commit1c5df850a0
)
This commit is contained in:
parent
72ddeffc09
commit
8f6debf633
@ -127,7 +127,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
|
|||||||
# netlink interface for nf_conntrack
|
# netlink interface for nf_conntrack
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/net/netfilter/nf_conntrack_rtcache.c
|
+++ b/net/netfilter/nf_conntrack_rtcache.c
|
||||||
@@ -0,0 +1,440 @@
|
@@ -0,0 +1,430 @@
|
||||||
+/* route cache for netfilter.
|
+/* route cache for netfilter.
|
||||||
+ *
|
+ *
|
||||||
+ * (C) 2014 Red Hat GmbH
|
+ * (C) 2014 Red Hat GmbH
|
||||||
@ -475,18 +475,8 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
|
|||||||
+ return ret;
|
+ return ret;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ ret = nf_register_net_hooks(&init_net, rtcache_ops,
|
|
||||||
+ ARRAY_SIZE(rtcache_ops));
|
|
||||||
+ if (ret < 0) {
|
|
||||||
+ nf_ct_extend_unregister(&rtcache_extend);
|
|
||||||
+ unregister_pernet_subsys(&rtcache_ops_net_ops);
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ret = register_netdevice_notifier(&nf_rtcache_notifier);
|
+ ret = register_netdevice_notifier(&nf_rtcache_notifier);
|
||||||
+ if (ret) {
|
+ if (ret) {
|
||||||
+ nf_unregister_net_hooks(&init_net, rtcache_ops,
|
|
||||||
+ ARRAY_SIZE(rtcache_ops));
|
|
||||||
+ nf_ct_extend_unregister(&rtcache_extend);
|
+ nf_ct_extend_unregister(&rtcache_extend);
|
||||||
+ unregister_pernet_subsys(&rtcache_ops_net_ops);
|
+ unregister_pernet_subsys(&rtcache_ops_net_ops);
|
||||||
+ }
|
+ }
|
||||||
|
Loading…
Reference in New Issue
Block a user