From: rodanber@gmail.com
To: arturo.borrero.glez@gmail.com
Cc: pablo@netfilter.org, netfilter-devel@vger.kernel.org,
"Roberto García" <rodanber@gmail.com>
Subject: [PATCH] iptables: extensions: libxt_MARK: Fix translation of --set-xmark option
Date: Tue, 21 Jun 2016 23:03:43 +0200 [thread overview]
Message-ID: <1466543023-15740-1-git-send-email-rodanber@gmail.com> (raw)
From: Roberto García <rodanber@gmail.com>
Fix translation of MARK target's --set-xmark option.
Before:
# iptables-translate -t mangle -A PREROUTING -j MARK --set-xmark 0x64/0xaf
nft add rule ip mangle PREROUTING counter meta mark set mark xor 0x64 and 0xaf
After:
# iptables-translate -t mangle -A PREROUTING -j MARK --set-xmark 0x64/0xaf
nft add rule ip mangle PREROUTING counter meta mark set mark xor 0x64 and \
0xffffff50
Signed-off-by: Roberto García <rodanber@gmail.com>
---
extensions/libxt_MARK.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extensions/libxt_MARK.c b/extensions/libxt_MARK.c
index ec1ed05..12ab94f 100644
--- a/extensions/libxt_MARK.c
+++ b/extensions/libxt_MARK.c
@@ -262,7 +262,7 @@ static int mark_tg_xlate(const void *ip, const struct xt_entry_target *target,
xt_xlate_add(xl, "0x%x ", info->mark);
else
xt_xlate_add(xl, "mark xor 0x%x and 0x%x ", info->mark,
- info->mask);
+ ~info->mask);
return 1;
}
--
2.8.0
--
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
next reply other threads:[~2016-06-21 21:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 21:03 rodanber [this message]
2016-06-22 9:49 ` [PATCH] iptables: extensions: libxt_MARK: Fix translation of --set-xmark option Arturo Borrero Gonzalez
2016-06-22 10:23 ` Florian Westphal
2016-06-22 11:34 ` Roberto García Calero
2016-06-22 17:55 ` Pablo Neira Ayuso
-- strict thread matches above, loose matches on Subject: below --
2016-06-22 12:31 rodanber
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=1466543023-15740-1-git-send-email-rodanber@gmail.com \
--to=rodanber@gmail.com \
--cc=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 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).