From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [libnftables PATCH] bitwise: xml: export len node
Date: Mon, 08 Jul 2013 13:52:31 +0200 [thread overview]
Message-ID: <20130708115231.19363.2980.stgit@nfdev.cica.es> (raw)
The len unsigned int was not being exported in XML.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
src/expr/bitwise.c | 5 +++--
tests/xmlfiles/20-rule-bitwise.xml | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/expr/bitwise.c b/src/expr/bitwise.c
index 67c120f..52fc648 100644
--- a/src/expr/bitwise.c
+++ b/src/expr/bitwise.c
@@ -280,8 +280,9 @@ nft_rule_expr_bitwise_snprintf_xml(char *buf, size_t size,
int len = size, offset = 0, ret;
ret = snprintf(buf, len, "<sreg>%u</sreg>"
- "<dreg>%u</dreg>",
- bitwise->sreg, bitwise->dreg);
+ "<dreg>%u</dreg>"
+ "<len>%u</len>",
+ bitwise->sreg, bitwise->dreg, bitwise->len);
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
ret = snprintf(buf+offset, len, "<mask>");
diff --git a/tests/xmlfiles/20-rule-bitwise.xml b/tests/xmlfiles/20-rule-bitwise.xml
index 411e28f..ce2d851 100644
--- a/tests/xmlfiles/20-rule-bitwise.xml
+++ b/tests/xmlfiles/20-rule-bitwise.xml
@@ -3,6 +3,7 @@
<expr type="bitwise">
<sreg>2</sreg>
<dreg>2</dreg>
+ <len>16</len>
<mask>
<data_reg type="value">
<len>16</len>
next reply other threads:[~2013-07-08 11:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 11:52 Arturo Borrero Gonzalez [this message]
2013-07-08 17:00 ` [libnftables PATCH] bitwise: xml: export len node Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130708115231.19363.2980.stgit@nfdev.cica.es \
--to=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.