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 /src/validators/ip-length | |
| 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 'src/validators/ip-length')
| -rwxr-xr-x | src/validators/ip-length | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/validators/ip-length b/src/validators/ip-length deleted file mode 100755 index d96093849..000000000 --- a/src/validators/ip-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 |
