diff options
| author | Kyrylo Yatsenko <hedrok@gmail.com> | 2025-09-01 20:07:09 +0300 |
|---|---|---|
| committer | Kyrylo Yatsenko <hedrok@gmail.com> | 2025-09-01 20:07:09 +0300 |
| commit | 3c435753698f79a88fba277f9df2b16db73f0473 (patch) | |
| tree | b758c6dcb4e34440b7658098b9963d999f423930 /scripts/package-build/linux-kernel | |
| parent | 9ea81ca125949f6ee05f68057f6e0ac7286b27f0 (diff) | |
| download | vyos-build-3c435753698f79a88fba277f9df2b16db73f0473.tar.gz vyos-build-3c435753698f79a88fba277f9df2b16db73f0473.zip | |
T75: ipt-netflow enable direction + fix vlan out
* add --enable-direction as requested
* Fix output of `cat /proc/net/stat/ipt_netflow_flows`:
previously if no VLAN, there was no output and table
columns were shifted when parsed.
Diffstat (limited to 'scripts/package-build/linux-kernel')
| -rwxr-xr-x | scripts/package-build/linux-kernel/build-ipt-netflow.sh | 2 | ||||
| -rw-r--r-- | scripts/package-build/linux-kernel/patches/ipt-netflow/0003-flows_dump_seq_show-fix-table-when-no-VLAN.patch | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/scripts/package-build/linux-kernel/build-ipt-netflow.sh b/scripts/package-build/linux-kernel/build-ipt-netflow.sh index f1df2d99..bae4051b 100755 --- a/scripts/package-build/linux-kernel/build-ipt-netflow.sh +++ b/scripts/package-build/linux-kernel/build-ipt-netflow.sh @@ -37,7 +37,7 @@ DEBIAN_DIR="tmp/" DEBIAN_CONTROL="${DEBIAN_DIR}/DEBIAN/control" DEBIAN_POSTINST="${CWD}/vyos-ipt-netflow.postinst" -./configure --enable-macaddress --enable-vlan --enable-sampler --enable-aggregation --kdir=${KERNEL_DIR} +./configure --enable-direction --enable-macaddress --enable-vlan --enable-sampler --enable-aggregation --kdir=${KERNEL_DIR} make all if [ "x$?" != "x0" ]; then diff --git a/scripts/package-build/linux-kernel/patches/ipt-netflow/0003-flows_dump_seq_show-fix-table-when-no-VLAN.patch b/scripts/package-build/linux-kernel/patches/ipt-netflow/0003-flows_dump_seq_show-fix-table-when-no-VLAN.patch new file mode 100644 index 00000000..df3192f9 --- /dev/null +++ b/scripts/package-build/linux-kernel/patches/ipt-netflow/0003-flows_dump_seq_show-fix-table-when-no-VLAN.patch @@ -0,0 +1,27 @@ +From a4f8dda069dfce77e6ef0764de476dfdca7dc812 Mon Sep 17 00:00:00 2001 +From: Kyrylo Yatsenko <hedrok@gmail.com> +Date: Mon, 1 Sep 2025 19:57:27 +0300 +Subject: [PATCH] flows_dump_seq_show: fix table when no VLAN + +When no VLAN nothing was output, so columns were off. +Output "-" when no VLAN. +--- + ipt_NETFLOW.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c +index eee8074..ca4d0f2 100644 +--- a/ipt_NETFLOW.c ++++ b/ipt_NETFLOW.c +@@ -1153,6 +1153,8 @@ static int flows_dump_seq_show(struct seq_file *seq, void *v) + seq_printf(seq, " %d", ntohs(nf->tuple.tag[0])); + if (nf->tuple.tag[1]) + seq_printf(seq, ",%d", ntohs(nf->tuple.tag[1])); ++ } else { ++ seq_printf(seq, " -"); + } + #endif + #if defined(ENABLE_MAC) || defined(ENABLE_VLAN) +-- +2.50.1 + |
