From 51e83a4deb4849152a29c160893f0823846d47a0 Mon Sep 17 00:00:00 2001 From: Giuseppe Longo Date: Thu, 16 Oct 2014 16:29:51 +0200 Subject: ebtables-compat: fix print_header This prints the header like ebtables. Signed-off-by: Giuseppe Longo Signed-off-by: Pablo Neira Ayuso --- iptables/nft-bridge.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'iptables/nft-bridge.c') diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index ab97881d..0e21b468 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -357,13 +357,17 @@ static void print_iface(const char *iface) *c = IF_WILDCARD; } +static void nft_bridge_print_table_header(const char *tablename) +{ + printf("Bridge table: %s\n\n", tablename); +} + static void nft_bridge_print_header(unsigned int format, const char *chain, const char *pol, 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, @@ -564,6 +568,7 @@ struct nft_family_ops nft_family_ops_bridge = { .parse_payload = nft_bridge_parse_payload, .parse_immediate = nft_bridge_parse_immediate, .parse_target = nft_bridge_parse_target, + .print_table_header = nft_bridge_print_table_header, .print_header = nft_bridge_print_header, .print_firewall = nft_bridge_print_firewall, .save_firewall = NULL, -- cgit v1.2.3