diff options
author | Arturo Borrero <arturo.borrero.glez@gmail.com> | 2013-06-03 22:44:55 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-06-18 17:42:05 +0200 |
commit | 1d1b818f3d6713b0a79bb1c0bda71446f08428af (patch) | |
tree | ded1137e4dd2364ccf37529680aed0d499f05163 /src | |
parent | 3aa8a65e0619890c38cc30890a8e4423aa71bf7c (diff) |
expr: xml: don't print target and match info
This is binary layout of the iptables target/match, we can do nothing
with it at this moment. Let's get rid of it.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/expr/match.c | 12 | ||||
-rw-r--r-- | src/expr/target.c | 12 |
2 files changed, 2 insertions, 22 deletions
diff --git a/src/expr/match.c b/src/expr/match.c index 03d7e47..165d24d 100644 --- a/src/expr/match.c +++ b/src/expr/match.c @@ -245,22 +245,12 @@ static int nft_rule_expr_match_snprintf_xml(char *buf, size_t len, struct nft_expr_match *mt) { int ret, size=len; - int i; int offset = 0; - uint8_t *data = (uint8_t *)mt->data; - ret = snprintf(buf, len, "<name>%s</name><rev>%u</rev><info>0x", + ret = snprintf(buf, len, "<name>%s</name><rev>%u</rev>", mt->name, mt->rev); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - for (i=0; i < mt->data_len; i++) { - ret = snprintf(buf+offset, len, "%x", data[i] & 0xff); - SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - } - - ret = snprintf(buf+offset, len, "</info>"); - SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - return offset; } diff --git a/src/expr/target.c b/src/expr/target.c index 4fd48a2..8c454a9 100644 --- a/src/expr/target.c +++ b/src/expr/target.c @@ -249,22 +249,12 @@ int nft_rule_exp_target_snprintf_xml(char *buf, size_t len, struct nft_expr_target *tg) { int ret, size=len; - int i; int offset = 0; - uint8_t *data = (uint8_t *)tg->data; - ret = snprintf(buf, len, "<name>%s</name><rev>%u</rev><info>0x", + ret = snprintf(buf, len, "<name>%s</name><rev>%u</rev>", tg->name, tg->rev); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - for (i=0; i < tg->data_len; i++) { - ret = snprintf(buf+offset, len, "%x", data[i] & 0xff); - SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - } - - ret = snprintf(buf+offset, len, "</info>"); - SNPRINTF_BUFFER_SIZE(ret, size, len, offset); - return offset; } |