[PATCH iptables 1/8] extensions: libipt_realm: add a missing space in translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Liping Zhang <liping.zhang@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
---
 extensions/libipt_realm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/libipt_realm.c b/extensions/libipt_realm.c
index fd0622a..8eea787 100644
--- a/extensions/libipt_realm.c
+++ b/extensions/libipt_realm.c
@@ -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",
-- 
2.5.5


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux