From 312ee15058fbb26feb6a93520417f0d5343ad15b Mon Sep 17 00:00:00 2001 From: Nicolas Fort Date: Thu, 1 Sep 2022 19:08:37 +0000 Subject: Firewall: T4651: Change proposed cli from ip-length to packet-length --- python/vyos/firewall.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'python/vyos') diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py index a4fd64830..ea28aa91d 100644 --- a/python/vyos/firewall.py +++ b/python/vyos/firewall.py @@ -266,9 +266,9 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name): output.append(icmp + ' type ' + rule_conf[icmp]['type']) - if 'ip_length' in rule_conf: + if 'packet_length' in rule_conf: #proto = rule_conf['protocol'] - length = rule_conf['ip_length'].split(',') + length = rule_conf['packet_length'].split(',') lengths = [] negated_lengths = [] @@ -279,9 +279,6 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name): else: lengths.append(p) - #if proto == 'tcp_udp': - # proto = 'th' - if lengths: lengths_str = ','.join(lengths) output.append(f'ip{def_suffix} length {{{lengths_str}}}') -- cgit v1.2.3