diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-09-09 17:08:22 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-09-09 17:08:22 +0000 |
commit | 5c5ffbca6acf715f4920926ef917b67b8594c6a9 (patch) | |
tree | dac630c3f23bcfef16a3067f4e9448bc6de5b387 | |
parent | 4443d4d629aedc3743a2e6a9ec9ab84bb0ea6fbb (diff) | |
download | pfsense-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.inc | 5 |
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 == "") |