Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
94a2da60
Commit
94a2da60
authored
Nov 06, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) kill ipsec_smp_dump_status
parent
5f34f72c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
37 deletions
+0
-37
ipsec.inc
src/etc/inc/ipsec.inc
+0
-37
No files found.
src/etc/inc/ipsec.inc
View file @
94a2da60
...
...
@@ -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
=
'<?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
=
""
;
$sread
=
""
;
while
(
!
strstr
(
$sread
,
"</message>"
))
{
$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
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment