diff options
author | Renato Botelho <renato@netgate.com> | 2015-10-30 16:03:57 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-10-30 16:03:57 -0200 |
commit | 93277f2c872737bd2c24df04d84b2b3719e374ea (patch) | |
tree | e081bffde42139eaf508dff7d3507aed0309dffa /etc/inc/ipsec.inc | |
parent | 90056c8719f815e49e5133eab020b47560eaddc0 (diff) | |
download | pfsense-93277f2c872737bd2c24df04d84b2b3719e374ea.zip pfsense-93277f2c872737bd2c24df04d84b2b3719e374ea.tar.gz |
Remove ipsec_smp_dump_status(), last dependency of strongswan XMP module
Diffstat (limited to 'etc/inc/ipsec.inc')
-rw-r--r-- | etc/inc/ipsec.inc | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/etc/inc/ipsec.inc b/etc/inc/ipsec.inc index 6654166..ec2b592 100644 --- a/etc/inc/ipsec.inc +++ b/etc/inc/ipsec.inc @@ -426,53 +426,6 @@ function ipsec_phase2_status(&$ipsec_status, &$phase2) { return false; } -function ipsec_smp_dump_status() { - global $config, $g, $custom_listtags; - - 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) { - log_error("Could not read status from IPsec"); - return; - } - $query = '<?xml version="1.0"?><message xmlns="http://www.strongswan.org/smp/1.0" type="request" id="1">'; - $query .= '<query><ikesalist/></query></message>'; - - @fwrite($fd, $query); - $response = ""; - while (!strstr($sread, "</message>")) { - $sread = fgets($fd); - if ($sread === false) { - break; - } - $response .= $sread; - } - fclose($fd); - - if ($sread === false) { - log_error("Error during reading of status from IPsec"); - return; - } - - @file_put_contents("{$g['tmp_path']}/smp_status.xml", $response); - unset($response, $sread); - - $custom_listtags = array('ikesa', 'childsa', 'network', 'auth'); - $response = parse_xml_config("{$g['tmp_path']}/smp_status.xml", "message"); - @unlink("{$g['tmp_path']}/smp_status.xml"); - unset($custom_listtags); - - return $response; -} - /* * Return dump of SPD table */ |