From 6990bbc5a76eee6683d228ec5c5e4e580b6208d5 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 29 Jan 2018 15:22:02 +0100 Subject: extensions: hashlimit: remove space before burst in translation to nft Fixes the following test: # python xlate-test.py extensions/libxt_hashlimit.txlate extensions/libxt_hashlimit.txlate: Fail src: iptables-translate -A OUTPUT -m tcp -p tcp --dport 443 -m hashlimit --hashlimit-upto 300 --hashlimit-burst 15 --hashlimit-mode srcip,dstip --hashlimit-name https --hashlimit-htable-expire 300000 -m state --state NEW -j DROP exp: nft add rule ip filter OUTPUT tcp dport 443 meter https { ip daddr . ip saddr timeout 300s limit rate 300/second burst 15 packets} ct state new counter drop res: nft add rule ip filter OUTPUT tcp dport 443 meter https { ip daddr . ip saddr timeout 300s limit rate 300/second burst 15 packets} ct state new counter drop 1 test file, 2 tests, 1 tests passed, 1 tests failed, 0 errors Signed-off-by: Pablo Neira Ayuso --- extensions/libxt_hashlimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extensions/libxt_hashlimit.c') diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c index 86234e3d..70bc615b 100644 --- a/extensions/libxt_hashlimit.c +++ b/extensions/libxt_hashlimit.c @@ -1353,7 +1353,7 @@ static int hashlimit_mt_xlate(struct xt_xlate *xl, const char *name, else { print_packets_rate_xlate(xl, cfg->avg, revision); if (cfg->burst != XT_HASHLIMIT_BURST) - xt_xlate_add(xl, " burst %lu packets", cfg->burst); + xt_xlate_add(xl, "burst %lu packets", cfg->burst); } xt_xlate_add(xl, "}"); -- cgit v1.2.3