diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-03-31 15:18:26 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2015-03-31 15:22:04 -0500 |
commit | 0b34a56cbcf514bee417abed14bba152a7cce814 (patch) | |
tree | 963f1243f806aabe07eee9d30c0f5cfae34a8afc /etc/inc/ipsec.inc | |
parent | 3bae851db897169cf3284608b4980bb86e056fad (diff) | |
download | pfsense-0b34a56cbcf514bee417abed14bba152a7cce814.zip pfsense-0b34a56cbcf514bee417abed14bba152a7cce814.tar.gz |
Add a check for whether IPsec is enabled, so it doesn't spit out "IPsec
daemon not running or has a problem!" when IPsec isn't enabled.
Diffstat (limited to 'etc/inc/ipsec.inc')
-rw-r--r-- | etc/inc/ipsec.inc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc index aa8524c..fc94acd 100644 --- a/etc/inc/ipsec.inc +++ b/etc/inc/ipsec.inc @@ -410,10 +410,14 @@ function ipsec_phase2_status(&$ipsec_status, &$phase2) { function ipsec_smp_dump_status() { global $config, $g, $custom_listtags; - if (!file_exists("{$g['varrun_path']}/charon.xml")) { - log_error("IPsec daemon not running or has a problem!"); - return; - } + if (isset($config['ipsec']['enable'])) { + if (!file_exists("{$g['varrun_path']}/charon.xml")) { + log_error("IPsec daemon not running or has a problem!"); + return; + } + } else { + return; + } $fd = @fsockopen("unix://{$g['varrun_path']}/charon.xml"); if (!$fd) { |