]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libipt_realm: add a missing space in translation
authorLiping Zhang <liping.zhang@spreadtrum.com>
Fri, 7 Oct 2016 11:08:49 +0000 (19:08 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 14 Oct 2016 16:59:35 +0000 (18:59 +0200)
We missed a blank space when do translate to nft, so if rt_realm can be
mapped to name, the result looks ugly:
  # iptables-translate -A OUTPUT -m realm --realm 0
  nft add rule ip filter OUTPUT rtclassidcosmos counter
                                         ^

Apply this patch:
  # iptables-translate -A OUTPUT -m realm --realm 0
  nft add rule ip filter OUTPUT rtclassid cosmos counter

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libipt_realm.c

index fd0622ada9e046d5842426756d8490dff61cccf5..8eea7874f53ce47150e82cca337d535930e27dbd 100644 (file)
@@ -121,7 +121,7 @@ print_realm_xlate(unsigned long id, unsigned long mask,
                if (numeric == 0)
                        name = xtables_lmap_id2name(realms, id);
                if (name)
-                       xt_xlate_add(xl, "%s%s",
+                       xt_xlate_add(xl, " %s%s",
                                   op == XT_OP_EQ ? "" : "!= ", name);
                else
                        xt_xlate_add(xl, " %s0x%lx",