]> git.ipfire.org Git - thirdparty/iptables.git/commit
ebtables: Fix entries count in chain listing
authorPhil Sutter <phil@nwl.cc>
Thu, 16 Aug 2018 16:14:36 +0000 (18:14 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 16 Aug 2018 17:43:47 +0000 (19:43 +0200)
commit294f9ef5ee354ff902dfdc091a604f93083c248d
tree8bf3106f6f2e57625141c25bdc9ea16e27ecfee9
parent6f29aa8e3486e2c12ab48425a7e9b01dd6417665
ebtables: Fix entries count in chain listing

The previous fix for reference counts in iptables-nft output wasn't
complete: While iptables lists the number of references for each custom
chain (i.e., the number of jumps to it), ebtables lists number of
entries (i.e., the number of rules contained) for each chain. Both used
the same value for it, although they are different metrics.

Fix this by passing both numbers separately to the 'print_header'
callback so that each tool may print the desired value.

Fixes: a0698de9866d2 ("xtables: Do not count rules as chain references")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft-arp.c
iptables/nft-bridge.c
iptables/nft-shared.c
iptables/nft-shared.h
iptables/nft.c
iptables/tests/shell/testcases/ebtables/0001-ebtables-basic_0