From 0e65c922fc0d51a8dff1a779863d4ae559aa9a4a Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Tue, 23 Dec 2014 13:24:26 +0100 Subject: ebtables-compat: fix counter listing With this patch: % sudo ebtables-compat -L --Lc Bridge table: filter Bridge chain: INPUT, entries: 0, policy: ACCEPT -j ACCEPT , pcnt = 123 -- bcnt = 123 Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- iptables/nft-bridge.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'iptables/nft-bridge.c') diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index 9772b5fe..807c4da0 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -470,6 +471,10 @@ static void nft_bridge_print_firewall(struct nft_rule *r, unsigned int num, } } + if (!(format & FMT_NOCOUNTS)) + printf(" , pcnt = %"PRIu64" -- bcnt = %"PRIu64"", + (uint64_t)cs.counters.pcnt, (uint64_t)cs.counters.bcnt); + if (!(format & FMT_NONEWLINE)) fputc('\n', stdout); } -- cgit v1.2.3