diff options
author | Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev> | 2022-01-11 20:41:20 +0100 |
---|---|---|
committer | Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev> | 2022-01-11 20:41:20 +0100 |
commit | 4793e2fc0baf09c8ef128147106acb8bb69ba02b (patch) | |
tree | 69990a98168d9456b4ba21e30a9eb0d2f2bcac19 /src/validators/port-range | |
parent | 24954d47010219d85f11e1f7aae70c91f7ce00b4 (diff) | |
download | vyos-1x-4793e2fc0baf09c8ef128147106acb8bb69ba02b.tar.gz vyos-1x-4793e2fc0baf09c8ef128147106acb8bb69ba02b.zip |
firewall: validators: T4174: Correct upper port range boundary
Diffstat (limited to 'src/validators/port-range')
-rwxr-xr-x | src/validators/port-range | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/validators/port-range b/src/validators/port-range index 657a21e20..6c01048f0 100755 --- a/src/validators/port-range +++ b/src/validators/port-range @@ -12,11 +12,11 @@ if __name__ == '__main__': port_range = sys.argv[1] if re.match('^[0-9]{1,5}-[0-9]{1,5}$', port_range): port_1, port_2 = port_range.split('-') - if int(port_1) not in range(1, 65535) or int(port_2) not in range(1, 65535): + if int(port_1) not in range(1, 65536) or int(port_2) not in range(1, 65536): error(port_range) if int(port_1) > int(port_2): error(port_range) - elif not port_range.isnumeric() or int(port_range) not in range(1, 65535): + elif not port_range.isnumeric() or int(port_range) not in range(1, 65536): error(port_range) else: sys.exit(2) |