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);