Sync w/ m0n0wall 1.21 to bring back in the overlap port check

This commit is contained in:
Scott Ullrich 2006-01-19 00:50:49 +00:00
parent 61438a1e2c
commit 0cea6311c5

View File

@ -133,14 +133,16 @@ if ($_POST) {
continue;
if ($natent['external-address'] != $_POST['extaddr'])
continue;
if (($natent['proto'] != $_POST['proto']) && ($natent['proto'] != "tcp/udp") && ($_POST['proto'] != "tcp/udp"))
continue;
list($begp,$endp) = explode("-", $natent['external-port']);
if (!$endp)
$endp = $begp;
if (!( (($_POST['beginport'] < $begp) && ($_POST['endport'] < $begp))
|| (($_POST['beginport'] > $endp) && ($_POST['endport'] > $endp)))) {
$input_errors[] = "The external port range overlaps with an existing entry.";
break;
}