summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-10-15 17:32:59 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-10-15 17:32:59 +0000
commit4b6e75fff990fb56d008d99e9a398e74ca7b2e45 (patch)
tree4331f7b15291d35c5ec0ef8f96f4ba2d55884184
parentcc8ad8a7ad128fe8c262f0e9abded0c5dd94126c (diff)
downloadpfsense-4b6e75fff990fb56d008d99e9a398e74ca7b2e45.zip
pfsense-4b6e75fff990fb56d008d99e9a398e74ca7b2e45.tar.gz
Check for valid IP address using is_ipaddr
Suggested-by: Ermal
-rw-r--r--etc/inc/filter.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 19da1f6..b5f4e1c 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -527,10 +527,10 @@ function filter_nat_rules_generate_if($if, $src = "any", $srcport = "", $dst = "
$tgt = "{$natip}/32";
} else {
$natip = get_current_wan_address($if);
- if($natip)
+ if(is_ipaddr($natip))
$tgt = "{$natip}/32";
else
- $tgt = "($if)";
+ $tgt = "($if)";
}
/* Add the hard set source port (useful for ISAKMP) */
OpenPOWER on IntegriCloud