Add a check to prevent this gateway code from triggering the address family check. This might not be all that is needed for Ticket #1949

This commit is contained in:
Seth Mos 2011-10-18 09:33:36 +02:00
parent 7cc56826c8
commit 9dfd60dbf5

View File

@ -217,7 +217,7 @@ if ($_POST) {
}
}
}
if (($_POST['ipprotocol'] <> "") && ($_POST['gateway'] <> "")) {
if (($_POST['ipprotocol'] <> "") && ($_POST['gateway'] <> "") && (is_ipaddr(lookup_gateway_ip_by_name($_POST['gateway'])))) {
if(($_POST['ipprotocol'] == "inet6") && (!is_ipaddrv6(lookup_gateway_ip_by_name($_POST['gateway'])))) {
$input_errors[] = gettext("You can not assign the IPv4 Gateway to a IPv6 Filter rule");
}