aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-04-30 09:26:00 +0200
committerFelix Fietkau <nbd@nbd.name>2018-06-13 12:54:25 +0200
commite820734f79e5acc02f837da37deb370d76cad8b2 (patch)
tree6bb2ed33c642159c4110b2d09198daf4ea694393 /target/linux/generic
parentec502cd3fe926f0dbc5f6020ee22929b18ef16ee (diff)
downloadupstream-e820734f79e5acc02f837da37deb370d76cad8b2.tar.gz
upstream-e820734f79e5acc02f837da37deb370d76cad8b2.tar.bz2
upstream-e820734f79e5acc02f837da37deb370d76cad8b2.zip
kernel: allow hardware NAT offload drivers to keep a priv pointer
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/pending-4.14/646-netfilter-nf_flow_table-rework-private-driver-data.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/target/linux/generic/pending-4.14/646-netfilter-nf_flow_table-rework-private-driver-data.patch b/target/linux/generic/pending-4.14/646-netfilter-nf_flow_table-rework-private-driver-data.patch
new file mode 100644
index 0000000000..f94d7ad301
--- /dev/null
+++ b/target/linux/generic/pending-4.14/646-netfilter-nf_flow_table-rework-private-driver-data.patch
@@ -0,0 +1,25 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Fri, 27 Apr 2018 14:42:14 +0200
+Subject: [PATCH] netfilter: nf_flow_table: rework private driver data
+
+Move the timeout out of the union, since it can be shared between the
+driver and the stack. Add a private pointer that the driver can use to
+point to its own data structures
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/include/net/netfilter/nf_flow_table.h
++++ b/include/net/netfilter/nf_flow_table.h
+@@ -81,9 +81,10 @@ struct flow_offload_tuple_rhash {
+ struct flow_offload {
+ struct flow_offload_tuple_rhash tuplehash[FLOW_OFFLOAD_DIR_MAX];
+ u32 flags;
++ u32 timeout;
+ union {
+ /* Your private driver data here. */
+- u32 timeout;
++ void *priv;
+ };
+ };
+