diff options
author | Liping Zhang <liping.zhang@spreadtrum.com> | 2016-06-27 21:57:25 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-07-01 16:29:11 +0200 |
commit | 09cad6470a1ef596876879c01bd8f9148e896dbe (patch) | |
tree | 68a67fcbce71c657560bc2a81024ff7e757b43bc /extensions/libipt_realm.c | |
parent | ca42442093d3dd97808aeacf6f3abbfbf0beeca6 (diff) |
extensions: libipt_realm: fix order of mask and id when do nft translation
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libipt_realm.c')
-rw-r--r-- | extensions/libipt_realm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/libipt_realm.c b/extensions/libipt_realm.c index beb24914..0a4bc3b3 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); |