diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-02-05 19:57:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-05 19:57:51 +0100 |
commit | 9077c834b3dea1e984e3153a245e4ac715f0bcb2 (patch) | |
tree | 10a815acb24511ec700e802c2e3ec0fc7ea6a844 /python/vyos/firewall.py | |
parent | 568c33e3773ca946470005c105446f40700f6844 (diff) | |
parent | 22f0794a9f195e69e277d48f031fe934febe9408 (diff) | |
download | vyos-1x-9077c834b3dea1e984e3153a245e4ac715f0bcb2.tar.gz vyos-1x-9077c834b3dea1e984e3153a245e4ac715f0bcb2.zip |
Merge pull request #1206 from sarthurdev/T4209
firewall: T4209: Fix support for rule `recent` matches
Diffstat (limited to 'python/vyos/firewall.py')
-rw-r--r-- | python/vyos/firewall.py | 4 |
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'])) |