netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nftables PATCH] rule: display rule handle as comment
@ 2013-05-20 23:09 Eric Leblond
  2013-05-21 13:53 ` Pablo Neira Ayuso
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Eric Leblond @ 2013-05-20 23:09 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Eric Leblond

Knowing the rule handle is necessary to be able to delete a single
rule. It was not displayed till now in the output and it was thus
impossible to remove a single rule.
This patch modify the listing output to add a comment containing
the handle.

Signed-off-by: Eric Leblond <eric@regit.org>
---
 src/rule.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/rule.c b/src/rule.c
index 9d9eaee..b2d7844 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+#include <inttypes.h>
 
 #include <statement.h>
 #include <rule.h>
@@ -136,6 +137,7 @@ void rule_print(const struct rule *rule)
 		printf(" ");
 		stmt->ops->print(stmt);
 	}
+	printf(" # handle %" PRIu64, rule->handle.handle);
 	printf("\n");
 }
 
-- 
1.7.10.4


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

end of thread, other threads:[~2013-05-31 11:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20 23:09 [nftables PATCH] rule: display rule handle as comment Eric Leblond
2013-05-21 13:53 ` Pablo Neira Ayuso
2013-05-30 14:22   ` [nftables PATCH] rule: add flag to " Eric Leblond
2013-05-31 11:11     ` Pablo Neira Ayuso
2013-05-21 19:06 ` [nftables PATCH] rule: " Patrick McHardy
2013-05-22 13:53 ` Jesper Dangaard Brouer
2013-05-22 15:35   ` Patrick McHardy

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).