Accept port range on Outbound NAT. Fixes #4300

This commit is contained in:
Renato Botelho 2015-01-28 16:45:58 -02:00
parent fee13fc057
commit b601f897a5

View File

@ -162,10 +162,10 @@ if ($_POST) {
if ($_POST['natport'])
$_POST['natport'] = trim($_POST['natport']);
if($protocol_uses_ports && $_POST['sourceport'] <> "" && !is_portoralias($_POST['sourceport']))
if($protocol_uses_ports && $_POST['sourceport'] <> "" && !(is_portoralias($_POST['sourceport']) || is_portrange($_POST['sourceport'])))
$input_errors[] = gettext("You must supply either a valid port or port alias for the source port entry.");
if($protocol_uses_ports && $_POST['dstport'] <> "" && !is_portoralias($_POST['dstport']))
if($protocol_uses_ports && $_POST['dstport'] <> "" && !(is_portoralias($_POST['dstport']) || is_portrange($_POST['dstport'])))
$input_errors[] = gettext("You must supply either a valid port or port alias for the destination port entry.");
if($protocol_uses_ports && $_POST['natport'] <> "" && !is_port($_POST['natport']) && !isset($_POST['nonat']))