summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system.php
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-04-13 13:58:57 +0200
committersmos <seth.mos@dds.nl>2012-04-13 13:58:57 +0200
commite617e9b1c1168704f59ee086fb8085b244202dfa (patch)
tree1f9c3b5da9c49e582ec67c0f5d2b436447359123 /usr/local/www/system.php
parent8bdb687946ddb997beb07caccfef61b961f4507e (diff)
downloadpfsense-e617e9b1c1168704f59ee086fb8085b244202dfa.zip
pfsense-e617e9b1c1168704f59ee086fb8085b244202dfa.tar.gz
Do not throw a address family error when there is just 1 gateway.
Fix the input logic for ticket #1662
Diffstat (limited to 'usr/local/www/system.php')
-rwxr-xr-xusr/local/www/system.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/system.php b/usr/local/www/system.php
index 914f182..6662f93 100755
--- a/usr/local/www/system.php
+++ b/usr/local/www/system.php
@@ -128,7 +128,7 @@ if ($_POST) {
if (($_POST[$dnsname] && !is_ipaddr($_POST[$dnsname]))) {
$input_errors[] = gettext("A valid IP address must be specified for the DNS server $dnscounter.");
}
- if (($_POST[$dnsgwname] <> "none") && (validate_address_family($_POST[$dnsname], lookup_gateway_ip_by_name($_POST[$dnsgwname])) === false )) {
+ if (($_POST[$dnsgwname]) && (is_ipaddr($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], lookup_gateway_ip_by_name($_POST[$dnsgwname])) === false )) {
$input_errors[] = gettext("The gateway specified for DNS server '{$_POST[$dnsname]}' is not from the same Address Family as gateway '". lookup_gateway_ip_by_name($_POST[$dnsgwname]) ."'.");
}
}
OpenPOWER on IntegriCloud