summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-12 18:49:17 +0100
committerGitHub <noreply@github.com>2022-01-12 18:49:17 +0100
commitddc7a0cc537841cf4697b36d06bf3ca0bb4f698c (patch)
treeddec5f51433c572143c293d0dcb43282d765d862 /src
parent391ce22b76190309f81e048ebffab778b0fdee1d (diff)
parenta132ba993e786994a3b129c72fb0024931339619 (diff)
downloadvyos-1x-ddc7a0cc537841cf4697b36d06bf3ca0bb4f698c.tar.gz
vyos-1x-ddc7a0cc537841cf4697b36d06bf3ca0bb4f698c.zip
Merge pull request #1161 from sarthurdev/firewall
firewall: T4160: Fix support for inverse matches
Diffstat (limited to 'src')
-rwxr-xr-xsrc/validators/port-multi2
1 files changed, 2 insertions, 0 deletions
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):