aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-02-20 15:58:42 +0100
committerFelix Fietkau <nbd@nbd.name>2018-02-21 20:12:42 +0100
commit820f03099894bd48638fb5be326b5c551f0f2b98 (patch)
tree22522d219f3d5b9ae2574b10e8dad8a2bb381e1c /package/network/utils
parent103335644265d96c656a7de3d5994fbd11246300 (diff)
downloadupstream-820f03099894bd48638fb5be326b5c551f0f2b98.tar.gz
upstream-820f03099894bd48638fb5be326b5c551f0f2b98.tar.bz2
upstream-820f03099894bd48638fb5be326b5c551f0f2b98.zip
netfilter: add a xt_FLOWOFFLOAD target for NAT/routing offload support
This makes it possible to add an iptables rule that offloads routing/NAT packet processing to a software fast path. This fast path is much quicker than running packets through the regular tables/chains. Requires Linux 4.14 Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/network/utils')
-rw-r--r--package/network/utils/iptables/patches/800-flowoffload_target.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/package/network/utils/iptables/patches/800-flowoffload_target.patch b/package/network/utils/iptables/patches/800-flowoffload_target.patch
new file mode 100644
index 0000000000..c6fe65cd3e
--- /dev/null
+++ b/package/network/utils/iptables/patches/800-flowoffload_target.patch
@@ -0,0 +1,18 @@
+--- /dev/null
++++ b/extensions/libxt_FLOWOFFLOAD.c
+@@ -0,0 +1,15 @@
++#include <xtables.h>
++
++static struct xtables_target offload_tg_reg[] = {
++ {
++ .family = NFPROTO_UNSPEC,
++ .name = "FLOWOFFLOAD",
++ .revision = 0,
++ .version = XTABLES_VERSION,
++ },
++};
++
++void _init(void)
++{
++ xtables_register_targets(offload_tg_reg, ARRAY_SIZE(offload_tg_reg));
++}