diff options
author | Christian Breunig <christian@breunig.cc> | 2023-10-19 19:10:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-19 19:10:32 +0200 |
commit | 887855b14e06745a7c0ee9dd677b5203c5a1177b (patch) | |
tree | ff1db0499ff1961c08b2d2018daf781860a3fa35 /python/vyos | |
parent | 6116840936d3d47aa55cc127c52eedeacfa4198b (diff) | |
parent | 6582bbc0f431c34a3405039d971af878aa23971b (diff) | |
download | vyos-1x-887855b14e06745a7c0ee9dd677b5203c5a1177b.tar.gz vyos-1x-887855b14e06745a7c0ee9dd677b5203c5a1177b.zip |
Merge pull request #2344 from nicolas-fort/T5637
T5637: add new rule at the end of base chains for default-actions and log capabilities
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/template.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py index 3be486cc4..c778d0de8 100644 --- a/python/vyos/template.py +++ b/python/vyos/template.py @@ -582,10 +582,11 @@ def nft_rule(rule_conf, fw_hook, fw_name, rule_id, ip_name='ip'): def nft_default_rule(fw_conf, fw_name, ipv6=False): output = ['counter'] default_action = fw_conf['default_action'] + family = 'ipv6' if ipv6 else 'ipv4' if 'enable_default_log' in fw_conf: action_suffix = default_action[:1].upper() - output.append(f'log prefix "[{fw_name[:19]}-default-{action_suffix}]"') + output.append(f'log prefix "[{family}-{fw_name[:19]}-default-{action_suffix}]"') #output.append(nft_action(default_action)) output.append(f'{default_action}') |