[openwrt/openwrt] kernel: enable conntrack counter updates for iptables xt_FLOWOFFLOAD

LEDE Commits lede-commits at lists.infradead.org
Fri Mar 24 02:16:04 PDT 2023


nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f84c94060fda7f8400f5ef1d94e072dce98977ad

commit f84c94060fda7f8400f5ef1d94e072dce98977ad
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Mar 23 21:44:10 2023 +0100

    kernel: enable conntrack counter updates for iptables xt_FLOWOFFLOAD
    
    Ensures that packet/byte counters in /proc/net/nf_conntrack are updated
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
index 961a930bb3..aa6c668558 100644
--- a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
+++ b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
 --- /dev/null
 +++ b/net/netfilter/xt_FLOWOFFLOAD.c
-@@ -0,0 +1,697 @@
+@@ -0,0 +1,698 @@
 +/*
 + * Copyright (C) 2018-2021 Felix Fietkau <nbd at nbd.name>
 + *
@@ -752,6 +752,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +{
 +	INIT_DELAYED_WORK(&tbl->work, xt_flowoffload_hook_work);
 +	tbl->ft.type = &flowtable_inet;
++	tbl->ft.flags = NF_FLOWTABLE_COUNTER;
 +
 +	return nf_flow_table_init(&tbl->ft);
 +}
@@ -770,7 +771,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +	if (ret)
 +		goto cleanup;
 +
-+	flowtable[1].ft.flags = NF_FLOWTABLE_HW_OFFLOAD;
++	flowtable[1].ft.flags |= NF_FLOWTABLE_HW_OFFLOAD;
 +
 +	ret = xt_register_target(&offload_tg_reg);
 +	if (ret)




More information about the lede-commits mailing list