From 64d53531cb80e1007b32f95e3758e3cc2e4bdae1 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Sun, 7 Apr 2013 22:35:02 +0000 Subject: src: rule: fix compat XML output The compat struct was not printed in XML. So, I think give output format is the first step to parse it. Signed-off-by: Arturo Borrero Signed-off-by: Pablo Neira Ayuso --- src/rule.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index 68fb6d9..3df1780 100644 --- a/src/rule.c +++ b/src/rule.c @@ -450,6 +450,13 @@ static int nft_rule_snprintf_xml(char *buf, size_t size, struct nft_rule *r, (unsigned long long)r->handle); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); + ret = snprintf(buf+offset, len, "%u" + "%u" + "%u", + r->rule_flags, + r->compat.flags, r->compat.proto); + SNPRINTF_BUFFER_SIZE(ret, size, len, offset); + list_for_each_entry(expr, &r->expr_list, head) { ret = snprintf(buf+offset, len, "\n\t\n", expr->ops->name); -- cgit v1.2.3