summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2022-01-27 16:58:36 +0100
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2022-02-04 01:09:42 +0100
commit22f0794a9f195e69e277d48f031fe934febe9408 (patch)
tree061df5244e08ca4132686c7ae7423b33cd28f4a9 /python
parent26774b890443d74f916858e6efd9189aa45f8cb4 (diff)
downloadvyos-1x-22f0794a9f195e69e277d48f031fe934febe9408.tar.gz
vyos-1x-22f0794a9f195e69e277d48f031fe934febe9408.zip
firewall: T4209: Fix support for rule `recent` matches
Diffstat (limited to 'python')
-rw-r--r--python/vyos/firewall.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py
index c1217b420..55ce318e7 100644
--- a/python/vyos/firewall.py
+++ b/python/vyos/firewall.py
@@ -181,9 +181,7 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name):
if 'recent' in rule_conf:
count = rule_conf['recent']['count']
time = rule_conf['recent']['time']
- # output.append(f'meter {fw_name}_{rule_id} {{ ip saddr and 255.255.255.255 limit rate over {count}/{time} burst {count} packets }}')
- # Waiting on input from nftables developers due to
- # bug with above line and atomic chain flushing.
+ output.append(f'add @RECENT{def_suffix}_{fw_name}_{rule_id} {{ {ip_name} saddr limit rate over {count}/{time} burst {count} packets }}')
if 'time' in rule_conf:
output.append(parse_time(rule_conf['time']))