summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-03-29 11:00:30 +0000
committerErmal <eri@pfsense.org>2010-03-29 11:00:30 +0000
commit051b178ac4ccdfabdf9dbf951d9243f68fb89e1e (patch)
tree2b82b1827f2b261bd8703de5f81be83038179d42 /etc
parent92dd6a83f34de3e5a36c60f18f825fd5a70d614b (diff)
downloadpfsense-051b178ac4ccdfabdf9dbf951d9243f68fb89e1e.zip
pfsense-051b178ac4ccdfabdf9dbf951d9243f68fb89e1e.tar.gz
Be more strict on validations.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/gwlb.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index e53673a..1b33cc1 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -150,14 +150,14 @@ EOD;
$i = 2;
foreach($gateways_arr as $name => $gateway) {
/* for dynamic gateways without an IP address we subtitute a local one */
- if((is_numeric($gateway['attribute'])) && ($a_gateway_item[$gateway['attribute']]['monitor'] <> "")) {
+ if((is_numeric($gateway['attribute'])) && is_ipaddr($a_gateway_item[$gateway['attribute']]['monitor'])) {
$gateway['monitor'] = $a_gateway_item[$gateway['attribute']]['monitor'];
} else {
if(($gateway['gateway'] == "dynamic") && ($gateway['monitor'])) {
$gateway['monitor'] = "127.0.0.{$i}";
$i++;
}
- if($gateway['monitor'] == "") {
+ if(!is_ipaddr($gateway['monitor'])) {
$gateway['monitor'] = $gateway['gateway'];
}
}
OpenPOWER on IntegriCloud