This prints the header like ebtables. Signed-off-by: Giuseppe Longo <giuseppelng@xxxxxxxxx> --- iptables/nft-bridge.c | 3 +-- iptables/nft.c | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index ab97881..1fe10ed 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -362,8 +362,7 @@ static void nft_bridge_print_header(unsigned int format, const char *chain, const struct xt_counters *counters, bool basechain, uint32_t refs) { - /* FIXME: Giuseppe replace this with ebtables format */ - print_header(format, chain, pol, counters, basechain, refs); + printf("Bridge chain: %s, entries: %u, policy: %s\n", chain, refs, pol); } static void nft_bridge_print_firewall(struct nft_rule *r, unsigned int num, diff --git a/iptables/nft.c b/iptables/nft.c index bab2834..0cdf027 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -2006,6 +2006,9 @@ int nft_rule_list(struct nft_handle *h, const char *chain, const char *table, if (iter == NULL) goto err; + if (h->family == NFPROTO_BRIDGE) + printf("Bridge table: %s\n\n", table); + c = nft_chain_list_iter_next(iter); while (c != NULL) { const char *chain_table = @@ -2033,8 +2036,8 @@ int nft_rule_list(struct nft_handle *h, const char *chain, const char *table, if (found) printf("\n"); - ops->print_header(format, chain_name, policy_name[policy], - &ctrs, basechain, refs); + ops->print_header(format, chain_name, + policy_name[policy], &ctrs, basechain, refs); __nft_rule_list(h, chain_name, table, rulenum, format, ops->print_firewall); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html