From 16c494c2f1364283988b52e35faf6b01745bbed4 Mon Sep 17 00:00:00 2001 From: Nicolas Fort Date: Mon, 6 Mar 2023 18:30:55 +0000 Subject: T5055: Firewall: add packet-type matcher in firewall and route policy --- python/vyos/firewall.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python') diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py index 149803bf0..5be897d5f 100644 --- a/python/vyos/firewall.py +++ b/python/vyos/firewall.py @@ -277,6 +277,9 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name): negated_lengths_str = ','.join(rule_conf['packet_length_exclude']) output.append(f'ip{def_suffix} length != {{{negated_lengths_str}}}') + if 'packet_type' in rule_conf: + output.append(f'pkttype ' + rule_conf['packet_type']) + if 'dscp' in rule_conf: dscp_str = ','.join(rule_conf['dscp']) output.append(f'ip{def_suffix} dscp {{{dscp_str}}}') -- cgit v1.2.3