Skip to content

Commit 3c43575

Browse files
committed
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.
1 parent 9ea81ca commit 3c43575

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

scripts/package-build/linux-kernel/build-ipt-netflow.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ DEBIAN_DIR="tmp/"
3737
DEBIAN_CONTROL="${DEBIAN_DIR}/DEBIAN/control"
3838
DEBIAN_POSTINST="${CWD}/vyos-ipt-netflow.postinst"
3939

40-
./configure --enable-macaddress --enable-vlan --enable-sampler --enable-aggregation --kdir=${KERNEL_DIR}
40+
./configure --enable-direction --enable-macaddress --enable-vlan --enable-sampler --enable-aggregation --kdir=${KERNEL_DIR}
4141
make all
4242

4343
if [ "x$?" != "x0" ]; then
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From a4f8dda069dfce77e6ef0764de476dfdca7dc812 Mon Sep 17 00:00:00 2001
2+
From: Kyrylo Yatsenko <hedrok@gmail.com>
3+
Date: Mon, 1 Sep 2025 19:57:27 +0300
4+
Subject: [PATCH] flows_dump_seq_show: fix table when no VLAN
5+
6+
When no VLAN nothing was output, so columns were off.
7+
Output "-" when no VLAN.
8+
---
9+
ipt_NETFLOW.c | 2 ++
10+
1 file changed, 2 insertions(+)
11+
12+
diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
13+
index eee8074..ca4d0f2 100644
14+
--- a/ipt_NETFLOW.c
15+
+++ b/ipt_NETFLOW.c
16+
@@ -1153,6 +1153,8 @@ static int flows_dump_seq_show(struct seq_file *seq, void *v)
17+
seq_printf(seq, " %d", ntohs(nf->tuple.tag[0]));
18+
if (nf->tuple.tag[1])
19+
seq_printf(seq, ",%d", ntohs(nf->tuple.tag[1]));
20+
+ } else {
21+
+ seq_printf(seq, " -");
22+
}
23+
#endif
24+
#if defined(ENABLE_MAC) || defined(ENABLE_VLAN)
25+
--
26+
2.50.1
27+

0 commit comments

Comments
 (0)