Only apply this port check for TCP and UDP.

This commit is contained in:
jim-p 2012-11-20 08:23:54 -05:00
parent e6a2acc15d
commit a6f64d3076

View File

@ -222,7 +222,7 @@ if ($_POST) {
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
$input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstendport']);
if (!isset($_POST['nordr']) && !is_portoralias($_POST['localbeginport'])) {
if ((strtoupper($_POST['proto']) == "TCP" || strtoupper($_POST['proto']) == "UDP" || strtoupper($_POST['proto']) == "TCP/UDP") && (!isset($_POST['nordr']) && !is_portoralias($_POST['localbeginport']))) {
$input_errors[] = sprintf(gettext("A valid local port must be specified. It must be a port alias or integer between 1 and 65535."), $_POST['localbeginport']);
}