diff --git a/src/www/firewall_nat_out_edit.php b/src/www/firewall_nat_out_edit.php index 7bae574af..2bece0874 100644 --- a/src/www/firewall_nat_out_edit.php +++ b/src/www/firewall_nat_out_edit.php @@ -213,11 +213,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $input_errors[] = gettext("Negating destination address of \"any\" is invalid."); } - if (!is_ipaddr($pconfig['targetip']) && !is_subnet($pconfig['targetip']) && !is_alias($pconfig['targetip']) && empty($pconfig['nonat'])) { + if (!empty($pconfig['targetip']) && !is_ipaddr($pconfig['targetip']) && !is_subnet($pconfig['targetip']) && !is_alias($pconfig['targetip']) && empty($pconfig['nonat'])) { $input_errors[] = gettext("A valid target IP address must be specified."); } /* Verify Pool Options */ - if (!is_alias($pconfig['targetip']) && substr($pconfig['poolopts'], 0, 11) == "round-robin") { + if (!empty($pconfig['targetip']) && !is_alias($pconfig['targetip']) && substr($pconfig['poolopts'], 0, 11) == "round-robin") { $input_errors[] = gettext("Only Round Robin pool options may be chosen when selecting an alias."); } @@ -558,7 +558,7 @@ include("head.inc");