kernel: fix kernel 5.15 FLOWOFFLOAD patch

This commit is contained in:
lean 2022-06-02 11:00:35 +08:00
parent 2b57a426cb
commit 2a33e979c8

View File

@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
--- /dev/null
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
@@ -0,0 +1,694 @@
@@ -0,0 +1,696 @@
+/*
+ * Copyright (C) 2018-2021 Felix Fietkau <nbd@nbd.name>
+ *
@ -289,9 +289,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+}
+
+static void
+xt_flowoffload_check_hook(struct nf_flowtable *flowtable, struct flow_offload *flow, void *data)
+xt_flowoffload_check_hook(struct nf_flowtable *flowtable,
+ struct flow_offload *flow, void *data)
+{
+ struct xt_flowoffload_table *table = data;
+ struct xt_flowoffload_table *table;
+ table = container_of(flowtable, struct xt_flowoffload_table, ft);
+ struct flow_offload_tuple *tuple0 = &flow->tuplehash[0].tuple;
+ struct flow_offload_tuple *tuple1 = &flow->tuplehash[1].tuple;
+ struct xt_flowoffload_hook *hook;
@ -854,4 +856,4 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+
void nf_flow_snat_port(const struct flow_offload *flow,
struct sk_buff *skb, unsigned int thoff,
u8 protocol, enum flow_offload_tuple_dir dir);
u8 protocol, enum flow_offload_tuple_dir dir);