From 94a2da602813465d9783c16bb8deff025c8e84ce Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 6 Nov 2015 17:20:27 +0000 Subject: [PATCH] (legacy) kill ipsec_smp_dump_status --- src/etc/inc/ipsec.inc | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/src/etc/inc/ipsec.inc b/src/etc/inc/ipsec.inc index 45bd5e6f1..984681216 100644 --- a/src/etc/inc/ipsec.inc +++ b/src/etc/inc/ipsec.inc @@ -245,43 +245,6 @@ function ipsec_phase1_status($ipsec_status, $ikeid) { return false; } -function ipsec_smp_dump_status() { - global $config, $g, $custom_listtags; - - if (!file_exists("/var/run/charon.xml")) { - log_error("IPsec daemon seems to have issues or not running!"); - return; - } - - $fd = @fsockopen("unix:///var/run/charon.xml"); - if (!$fd) { - log_error("Could not read status from ipsec"); - return; - } - $query = ''; - $query .= ''; - - @fwrite($fd, $query); - $response = ""; - $sread = ""; - while (!strstr($sread, "")) { - $sread = fgets($fd); - $response .= $sread; - } - fclose($fd); - - $smp_status_xml = '/tmp/smp_status.xml'; - @file_put_contents($smp_status_xml, $response); - unset($response, $sread); - - $custom_listtags = array('ikesa', 'childsa', 'network', 'auth'); - $response = parse_xml_config($smp_status_xml, 'message'); - @unlink($smp_status_xml); - unset($custom_listtags); - - return $response; -} - /* * Return dump of SPD table */