diff options
author | Nicolas Fort <nicolasfort1988@gmail.com> | 2022-09-01 19:08:37 +0000 |
---|---|---|
committer | Nicolas Fort <nicolasfort1988@gmail.com> | 2022-09-01 19:08:37 +0000 |
commit | 312ee15058fbb26feb6a93520417f0d5343ad15b (patch) | |
tree | a08e7e47735de7ad136cc618ffa46054237476b8 /python/vyos/firewall.py | |
parent | 37cfa8cdb1c6a1d395109aabd3ee29e83db151da (diff) | |
download | vyos-1x-312ee15058fbb26feb6a93520417f0d5343ad15b.tar.gz vyos-1x-312ee15058fbb26feb6a93520417f0d5343ad15b.zip |
Firewall: T4651: Change proposed cli from ip-length to packet-length
Diffstat (limited to 'python/vyos/firewall.py')
-rw-r--r-- | python/vyos/firewall.py | 7 |
1 files changed, 2 insertions, 5 deletions
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}}}') |