rework 5ad905c897 (https://github.com/opnsense/core/issues/3189), accidentally dropped support for known services ;)

This commit is contained in:
Ad Schellevis 2019-02-06 08:40:31 +01:00
parent f3601c1c86
commit 521afca140

View File

@ -195,8 +195,9 @@ class Util
$tmp = explode(':', $number);
foreach ($tmp as $port) {
if (!getservbyname($port, "tcp") && !getservbyname($port, "udp")
&& filter_var($port, FILTER_VALIDATE_INT, array(
"options" => array("min_range"=>1, "max_range"=>65535))) === false
&& (filter_var($port, FILTER_VALIDATE_INT, array(
"options" => array("min_range"=>1, "max_range"=>65535))
) === false || !is_numeric($port))
) {
return false;
}