From 4272426912b0951b4dc7f40179d5217b513775e1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 9 Oct 2014 12:45:42 +0200 Subject: arptables-compat: get output in sync with arptables -L -n --line-numbers # arptables-compat -L -n --line-numbers Chain INPUT (policy ACCEPT) num target prot opt source destination <-- This header is not shown by arptables. Signed-off-by: Pablo Neira Ayuso --- iptables/nft-ipv4.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'iptables/nft-ipv4.c') diff --git a/iptables/nft-ipv4.c b/iptables/nft-ipv4.c index cb1d45b1..eedcb509 100644 --- a/iptables/nft-ipv4.c +++ b/iptables/nft-ipv4.c @@ -221,6 +221,14 @@ static void nft_ipv4_parse_immediate(const char *jumpto, bool nft_goto, cs->fw.ip.flags |= IPT_F_GOTO; } +static void nft_ipv4_print_header(unsigned int format, const char *chain, + const char *pol, + const struct xt_counters *counters, + bool basechain, uint32_t refs) +{ + print_header(format, chain, pol, counters, basechain, refs); +} + static void print_ipv4_addr(const struct iptables_command_state *cs, unsigned int format) { @@ -415,6 +423,7 @@ struct nft_family_ops nft_family_ops_ipv4 = { .parse_meta = nft_ipv4_parse_meta, .parse_payload = nft_ipv4_parse_payload, .parse_immediate = nft_ipv4_parse_immediate, + .print_header = nft_ipv4_print_header, .print_firewall = nft_ipv4_print_firewall, .save_firewall = nft_ipv4_save_firewall, .save_counters = nft_ipv4_save_counters, -- cgit v1.2.3