From a132ba993e786994a3b129c72fb0024931339619 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Wed, 12 Jan 2022 00:59:53 +0100 Subject: firewall: T4160: Fix support for inverse matches --- src/validators/port-multi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/validators/port-multi') diff --git a/src/validators/port-multi b/src/validators/port-multi index 017ea78fb..cef371563 100755 --- a/src/validators/port-multi +++ b/src/validators/port-multi @@ -22,6 +22,8 @@ if __name__ == '__main__': services = get_services() for port in ports: + if port and port[0] == '!': + port = port[1:] if re.match('^[0-9]{1,5}-[0-9]{1,5}$', port): port_1, port_2 = port.split('-') if int(port_1) not in range(1, 65536) or int(port_2) not in range(1, 65536): -- cgit v1.2.3