summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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