Patchwork [libnftables,3/4] rule: display position in default printf

login
register
mail settings
Submitter Eric Leblond
Date July 6, 2013, 3:33 p.m.
Message ID <1373124796-6810-3-git-send-email-eric@regit.org>
Download mbox | patch
Permalink /patch/257288/
State Accepted
Headers show

Comments

Eric Leblond - July 6, 2013, 3:33 p.m.
Signed-off-by: Eric Leblond <eric@regit.org>
---
 src/rule.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Pablo Neira - July 19, 2013, 12:32 p.m.
Also applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/src/rule.c b/src/rule.c
index a56df34..9dc82b8 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -769,9 +769,9 @@  static int nft_rule_snprintf_default(char *buf, size_t size, struct nft_rule *r,
 	struct nft_rule_expr *expr;
 	int ret, len = size, offset = 0;
 
-	ret = snprintf(buf, size, "%s %s %s %"PRIu64"\n",
+	ret = snprintf(buf, size, "%s %s %s %"PRIu64" %"PRIu64"\n",
 			nft_family2str(r->family), r->table, r->chain,
-			r->handle);
+			r->handle, r->position);
 	SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
 
 	list_for_each_entry(expr, &r->expr_list, head) {