diff options
author | Renato Botelho <renato@netgate.com> | 2015-11-03 16:58:58 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-11-03 16:58:58 -0200 |
commit | d6d9144e203f6fc350b4c96dc49271553e121b02 (patch) | |
tree | 160ff150655ebbf4b467539c1f72f66454e9aa86 /etc/inc/ipsec.inc | |
parent | b31b713d683ecda6940fdba1bd0c4717bcdc0f21 (diff) | |
download | pfsense-d6d9144e203f6fc350b4c96dc49271553e121b02.zip pfsense-d6d9144e203f6fc350b4c96dc49271553e121b02.tar.gz |
Only call pfSense_ipsec_list_sa() when IPsec is enabled
Diffstat (limited to 'etc/inc/ipsec.inc')
-rw-r--r-- | etc/inc/ipsec.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc index ec2b592..b60dd49 100644 --- a/etc/inc/ipsec.inc +++ b/etc/inc/ipsec.inc @@ -427,6 +427,19 @@ function ipsec_phase2_status(&$ipsec_status, &$phase2) { } /* + * Wrapper to call pfSense_ipsec_list_sa() when IPsec is enabled + */ +function ipsec_list_sa() { + global $config; + + if (isset($config['ipsec']['enable'])) { + return pfSense_ipsec_list_sa(); + } + + return array(); +} + +/* * Return dump of SPD table */ function ipsec_dump_spd() { |