diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-09-03 20:37:10 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-09-03 20:37:10 +0200 |
commit | d9eb48a0ced1eb60bd00fe2f18559b3c780ee98a (patch) | |
tree | 1c435788f7c78d2ec422652695ccb5361af71d40 /src | |
parent | 2791fd446e54e909bbcdb8e753e0c3774204318c (diff) | |
download | vyos-1x-d9eb48a0ced1eb60bd00fe2f18559b3c780ee98a.tar.gz vyos-1x-d9eb48a0ced1eb60bd00fe2f18559b3c780ee98a.zip |
firewall: T4651: re-implement packet-length CLI option to use <multi/>
Diffstat (limited to 'src')
-rwxr-xr-x | src/validators/packet-length | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/validators/packet-length b/src/validators/packet-length deleted file mode 100755 index d96093849..000000000 --- a/src/validators/packet-length +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/python3 - -from sys import argv -from sys import exit -import re - -if __name__ == '__main__': - if len(argv)>1: - lengths = argv[1].split(",") - - for length in lengths: - if length and length[0] == '!': - length = length[1:] - if re.match('^[0-9]{1,5}-[0-9]{1,5}$', length): - length_1, length_2 = length.split('-') - if int(length_1) not in range(0, 65536) or int(length_2) not in range(0, 65536): - print(f'Error: {length} is not a valid length range') - exit(1) - if int(length_1) > int(length_2): - print(f'Error: {length} is not a valid length range') - exit(1) - elif length.isnumeric(): - if int(length) not in range(0, 65536): - print(f'Error: {length} is not a valid length value') - exit(1) - else: - exit(2) - - exit(0)
\ No newline at end of file |