summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system.php
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-05-25 21:14:42 +0200
committersmos <seth.mos@dds.nl>2012-05-25 21:16:59 +0200
commit13ea7caa6bf1e837ce44694f2e3826254f5752e9 (patch)
tree43acfbcffa3e9923cd916177ab8b06f686f6a491 /usr/local/www/system.php
parent2e9b8f61f6ba1333f4004d45ead325d4c7dcaffb (diff)
downloadpfsense-13ea7caa6bf1e837ce44694f2e3826254f5752e9.zip
pfsense-13ea7caa6bf1e837ce44694f2e3826254f5752e9.tar.gz
Make sure that we only perform validation if the GW name is filled as well as a IP address
Diffstat (limited to 'usr/local/www/system.php')
-rwxr-xr-xusr/local/www/system.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr/local/www/system.php b/usr/local/www/system.php
index 1d477f4..644a87c 100755
--- a/usr/local/www/system.php
+++ b/usr/local/www/system.php
@@ -128,11 +128,13 @@ 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") && (is_ipaddrv4($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false )) {
- $input_errors[] = gettext("You can not specify a IPv6 gateway '{$_POST[$dnsgwname]}'for a IPv4 DNS server '{$_POST[$dnsname]}'");
- }
- if (($_POST[$dnsgwname] <> "none") && (is_ipaddrv6($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false )) {
- $input_errors[] = gettext("You can not specify a IPv4 gateway '{$_POST[$dnsgwname]}'for a IPv6 DNS server '{$_POST[$dnsname]}'");
+ if(($_POST[$dnsgwname] <> "") && (is_ipaddr($_POST[$dnsname]))) {
+ if (($_POST[$dnsgwname] <> "none") && (is_ipaddrv4($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false )) {
+ $input_errors[] = gettext("You can not specify a IPv6 gateway '{$_POST[$dnsgwname]}'for a IPv4 DNS server '{$_POST[$dnsname]}'");
+ }
+ if (($_POST[$dnsgwname] <> "none") && (is_ipaddrv6($_POST[$dnsname])) && (validate_address_family($_POST[$dnsname], $_POST[$dnsgwname]) === false )) {
+ $input_errors[] = gettext("You can not specify a IPv4 gateway '{$_POST[$dnsgwname]}'for a IPv6 DNS server '{$_POST[$dnsname]}'");
+ }
}
}
OpenPOWER on IntegriCloud