summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_hbh.c
diff options
context:
space:
mode:
authorPablo M. Bermudo Garay <pablombg@gmail.com>2016-07-09 12:27:51 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-07-09 13:44:46 +0200
commitf035be35c749d5c5cbb7ffdbcd1c548b91bd3033 (patch)
tree69f5402722a70645f783d761e2ec60a4e99a85e1 /extensions/libip6t_hbh.c
parente8f857a5a1514c3e7d0d8ea0f7d2d571f0e37bd1 (diff)
xtables-translate: fix multiple spaces issue
This patch fixes a multiple spaces issue. The problem arises when a rule set loaded through iptables-compat-restore is listed in nft. Before this commit, two spaces were printed after every match translation: $ sudo iptables-save *filter :INPUT ACCEPT [0:0] -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m multiport --dports 80:85 -m ttl --ttl-gt 5 -j ACCEPT COMMIT $ sudo iptables-compat-restore iptables-save $ sudo nft list ruleset table ip filter { chain INPUT { type filter hook input priority 0; policy accept; ct state related,established counter packets 0 bytes 0 accept ^^ ip protocol tcp tcp dport 80-85 ip ttl gt 5 counter packets 0 bytes 0 accept ^^ ^^ } } Signed-off-by: Pablo M. Bermudo Garay <pablombg@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libip6t_hbh.c')
-rw-r--r--extensions/libip6t_hbh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/libip6t_hbh.c b/extensions/libip6t_hbh.c
index 416681d2..cb7e4e8a 100644
--- a/extensions/libip6t_hbh.c
+++ b/extensions/libip6t_hbh.c
@@ -173,7 +173,7 @@ static int hbh_xlate(const void *ip, const struct xt_entry_match *match,
(optinfo->flags & IP6T_OPTS_OPTS))
return 0;
- xt_xlate_add(xl, "hbh hdrlength %s%u ",
+ xt_xlate_add(xl, "hbh hdrlength %s%u",
(optinfo->invflags & IP6T_OPTS_INV_LEN) ? "!= " : "",
optinfo->hdrlen);