* [PATCH iptables] extensions: libipt_realm: fix order of mask and id when do nft translation
@ 2016-06-27 13:57 Liping Zhang
2016-07-01 14:19 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Liping Zhang @ 2016-06-27 13:57 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, Liping Zhang, Shivani Bhardwaj
From: Liping Zhang <liping.zhang@spreadtrum.com>
Before:
# iptables-translate -A INPUT -m realm --realm 1/0xf
nft add rule ip filter INPUT rtclassid and 0x1 == 0xf counter
Apply this patch:
# iptables-translate -A INPUT -m realm --realm 1/0xf
nft add rule ip filter INPUT rtclassid and 0xf == 0x1 counter
Cc: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
---
extensions/libipt_realm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/extensions/libipt_realm.c b/extensions/libipt_realm.c
index beb2491..0a4bc3b 100644
--- a/extensions/libipt_realm.c
+++ b/extensions/libipt_realm.c
@@ -115,8 +115,8 @@ print_realm_xlate(unsigned long id, unsigned long mask,
const char *name = NULL;
if (mask != 0xffffffff)
- xt_xlate_add(xl, " and 0x%lx %s 0x%lx ", id,
- op == XT_OP_EQ ? "==" : "!=", mask);
+ xt_xlate_add(xl, " and 0x%lx %s 0x%lx ", mask,
+ op == XT_OP_EQ ? "==" : "!=", id);
else {
if (numeric == 0)
name = xtables_lmap_id2name(realms, id);
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iptables] extensions: libipt_realm: fix order of mask and id when do nft translation
2016-06-27 13:57 [PATCH iptables] extensions: libipt_realm: fix order of mask and id when do nft translation Liping Zhang
@ 2016-07-01 14:19 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2016-07-01 14:19 UTC (permalink / raw)
To: Liping Zhang; +Cc: netfilter-devel, Liping Zhang, Shivani Bhardwaj
On Mon, Jun 27, 2016 at 09:57:25PM +0800, Liping Zhang wrote:
> From: Liping Zhang <liping.zhang@spreadtrum.com>
>
> Before:
> # iptables-translate -A INPUT -m realm --realm 1/0xf
> nft add rule ip filter INPUT rtclassid and 0x1 == 0xf counter
>
> Apply this patch:
> # iptables-translate -A INPUT -m realm --realm 1/0xf
> nft add rule ip filter INPUT rtclassid and 0xf == 0x1 counter
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-01 14:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-27 13:57 [PATCH iptables] extensions: libipt_realm: fix order of mask and id when do nft translation Liping Zhang
2016-07-01 14:19 ` Pablo Neira Ayuso
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).