From cf4607b69331b32e04a325253d61fa3a10127735 Mon Sep 17 00:00:00 2001 From: Ilia Date: Sun, 10 Apr 2022 03:10:20 +0300 Subject: [PATCH] Ports can be a range --- firewalld/firewalld-lib.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firewalld/firewalld-lib.pl b/firewalld/firewalld-lib.pl index 4ce6b9839..4e1dff5d4 100644 --- a/firewalld/firewalld-lib.pl +++ b/firewalld/firewalld-lib.pl @@ -94,7 +94,7 @@ my @protos; if (-r $service_file) { my $lref = &read_file_lines($service_file, 1); foreach my $l (@{$lref}) { - $l =~ /\S+)["']\s+port=["'](?\d+)["']\/>/; + $l =~ /\S+)["']\s+port=["'](?[\d-]+)["']\/>/; my $port = "$+{port}"; my $proto = "$+{proto}"; push(@ports, $port) if ($port);