netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [iptables-compat PATCH 1/3] ebtables-compat: fix print_header
@ 2014-10-16 14:29 Giuseppe Longo
  2014-10-16 14:29 ` [iptables-compat PATCH 2/3] nft: fix syntax error Giuseppe Longo
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Giuseppe Longo @ 2014-10-16 14:29 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Giuseppe Longo

This prints the header like ebtables.

Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-10-20  9:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-16 14:29 [iptables-compat PATCH 1/3] ebtables-compat: fix print_header Giuseppe Longo
2014-10-16 14:29 ` [iptables-compat PATCH 2/3] nft: fix syntax error Giuseppe Longo
2014-10-20  9:01   ` Pablo Neira Ayuso
2014-10-16 14:29 ` [iptables-compat PATCH 3/3] nft-ipv46: replace offset var with ctx->payload.offset Giuseppe Longo
2014-10-20  9:02   ` Pablo Neira Ayuso
2014-10-20  9:01 ` [iptables-compat PATCH 1/3] ebtables-compat: fix print_header Pablo Neira Ayuso
2014-10-20  9:04   ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).