]> git.ipfire.org Git - thirdparty/iptables.git/commit
extensions: hashlimit: Rename 'flow table' keyword to meter
authorshyam saini <mayhs11saini@gmail.com>
Fri, 26 Jan 2018 18:41:16 +0000 (00:11 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 29 Jan 2018 14:23:10 +0000 (15:23 +0100)
commit13ecaeb0f28158dfe11bd7577cd483d86de23983
tree645500fba2abd7b5c7bb68e76c16db3be47d1319
parentc252a2b092a6d52ae7c6a7cf073ec6b4e412ab5a
extensions: hashlimit: Rename 'flow table' keyword to meter

After nft v0.8.1 "flow table" is renamed as meter.
This should reflect in iptables to nftables translation.

Before this patch:
$ iptables-translate -A INPUT -m tcp -p tcp --dport 80 -m hashlimit
--hashlimit-above 200/sec --hashlimit-mode srcip,dstport
--hashlimit-name http1 -j DROP

nft add rule ip filter INPUT tcp dport 80 flow table http1 { tcp dport .
ip saddr limit rate over 200/second } counter drop

After this patch:
$ iptables-translate -A INPUT -m tcp -p tcp --dport 80 -m hashlimit
--hashlimit-upto 200 --hashlimit-mode srcip --hashlimit-name http3
--hashlimit-srcmask 24 -j DROP

nft add rule ip filter INPUT tcp dport 80 meter http3 { ip saddr and
255.255.255.0 limit rate 200/second } counter drop

Signed-off-by: shyam saini <mayhs11saini@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_hashlimit.c
extensions/libxt_hashlimit.txlate