64 lines
2.1 KiB
Diff
64 lines
2.1 KiB
Diff
From: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
Date: Sat, 23 Nov 2019 16:43:00 +0100
|
|
Subject: Revert "kernel: nf_conntrack_rtcache: fix cleanup on netns delete and rmmod"
|
|
|
|
This reverts commit 436dbf12aa7381bd6db1b03b36be5a73df386eb4.
|
|
|
|
https://bugs.openwrt.org/index.php?do=details&task_id=2624
|
|
|
|
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
|
|
|
|
diff --git a/target/linux/generic/backport-4.14/020-backport_netfilter_rtcache.patch b/target/linux/generic/backport-4.14/020-backport_netfilter_rtcache.patch
|
|
index d745a970269061c56ef92677db0e85e96207f58b..8a6fba4307c2f7f7384f7274f39cf54c1a0ea7ae 100644
|
|
--- a/target/linux/generic/backport-4.14/020-backport_netfilter_rtcache.patch
|
|
+++ b/target/linux/generic/backport-4.14/020-backport_netfilter_rtcache.patch
|
|
@@ -127,7 +127,7 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
# netlink interface for nf_conntrack
|
|
--- /dev/null
|
|
+++ b/net/netfilter/nf_conntrack_rtcache.c
|
|
-@@ -0,0 +1,440 @@
|
|
+@@ -0,0 +1,428 @@
|
|
+/* route cache for netfilter.
|
|
+ *
|
|
+ * (C) 2014 Red Hat GmbH
|
|
@@ -444,11 +444,6 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
+ .destroy = nf_conn_rtcache_destroy,
|
|
+};
|
|
+
|
|
-+static int __net_init rtcache_net_init(struct net *net)
|
|
-+{
|
|
-+ return nf_register_net_hooks(net, rtcache_ops, ARRAY_SIZE(rtcache_ops));
|
|
-+}
|
|
-+
|
|
+static void __net_exit rtcache_net_exit(struct net *net)
|
|
+{
|
|
+ /* remove hooks so no new connections get rtcache extension */
|
|
@@ -456,7 +451,6 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
+}
|
|
+
|
|
+static struct pernet_operations rtcache_ops_net_ops = {
|
|
-+ .init = rtcache_net_init,
|
|
+ .exit = rtcache_net_exit,
|
|
+};
|
|
+
|
|
@@ -537,11 +531,6 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
+ synchronize_net();
|
|
+
|
|
+ unregister_netdevice_notifier(&nf_rtcache_notifier);
|
|
-+ unregister_pernet_subsys(&rtcache_ops_net_ops);
|
|
-+ for_each_net(net)
|
|
-+ nf_unregister_net_hooks(net, rtcache_ops, ARRAY_SIZE(rtcache_ops));
|
|
-+
|
|
-+ synchronize_net();
|
|
+
|
|
+ rtnl_lock();
|
|
+
|
|
@@ -558,7 +547,6 @@ Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
+ }
|
|
+
|
|
+ rtnl_unlock();
|
|
-+
|
|
+ synchronize_net();
|
|
+ nf_ct_extend_unregister(&rtcache_extend);
|
|
+}
|