summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-09-09 17:08:22 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-09-09 17:08:22 +0000
commit5c5ffbca6acf715f4920926ef917b67b8594c6a9 (patch)
treedac630c3f23bcfef16a3067f4e9448bc6de5b387
parent4443d4d629aedc3743a2e6a9ec9ab84bb0ea6fbb (diff)
downloadpfsense-5c5ffbca6acf715f4920926ef917b67b8594c6a9.zip
pfsense-5c5ffbca6acf715f4920926ef917b67b8594c6a9.tar.gz
* Do not create ipsec rules if the tunnel item is disabled
* Do not create ipsec rules at all if ipsec is disabled Ticket #476
-rw-r--r--etc/inc/filter.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 4baaae0..f26d586 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -2148,8 +2148,11 @@ EOD;
$ipsec_ip = $sasyncd['ip'];
}
- if(is_array($config['ipsec']['tunnel'])) {
+ if(is_array($config['ipsec']['tunnel']) && isset($config['ipsec']['enable'])) {
foreach ($config['ipsec']['tunnel'] as $tunnel) {
+ /* if tunnel is disabled, lets skip to next item */
+ if(isset($tunnel['disabled']))
+ continue;
/* is this a dynamic dns hostname? */
$remote_gateway = gethostbyname($tunnel['remote-gateway']);
if($remote_gateway == "")
OpenPOWER on IntegriCloud