blob: 5dd8dc04afac15afcd63ead7b8c1ba0b1342659f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
From b0366b08a206039dc73c08678af77916a06cf655 Mon Sep 17 00:00:00 2001
From: Kyrylo Yatsenko <hedrok@gmail.com>
Date: Thu, 4 Sep 2025 09:01:13 +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 so that tools can parse table properly.
---
ipt_NETFLOW.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
index 3c9cc05..21b65ac 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)
|