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
746357a3
Commit
746357a3
authored
Apr 27, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipsec: fix crash reports
(cherry picked from commit
504c0762
)
parent
a95c3cd5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
18 deletions
+24
-18
ipsec.widget.php
src/www/widgets/widgets/ipsec.widget.php
+24
-18
No files found.
src/www/widgets/widgets/ipsec.widget.php
View file @
746357a3
...
@@ -72,11 +72,18 @@ if (isset($config['ipsec']['phase1'])) {
...
@@ -72,11 +72,18 @@ if (isset($config['ipsec']['phase1'])) {
}
}
$ipsec_leases
=
json_decode
(
configd_run
(
"ipsec list leases"
),
true
);
$ipsec_leases
=
json_decode
(
configd_run
(
"ipsec list leases"
),
true
);
if
(
$ipsec_leases
==
null
)
{
$ipsec_leases
=
array
();
}
// parse configured tunnels
$ipsec_status
=
json_decode
(
configd_run
(
"ipsec list status"
),
true
);
$ipsec_status
=
json_decode
(
configd_run
(
"ipsec list status"
),
true
);
if
(
$ipsec_status
==
null
)
{
$ipsec_status
=
array
();
}
// parse configured tunnels
$activetunnels
=
0
;
$activetunnels
=
0
;
if
(
$ipsec_status
!=
null
)
{
foreach
(
$ipsec_status
as
$status_key
=>
$status_value
)
{
foreach
(
$ipsec_status
as
$status_key
=>
$status_value
)
{
if
(
isset
(
$status_value
[
'children'
]))
{
if
(
isset
(
$status_value
[
'children'
]))
{
foreach
(
$status_value
[
'children'
]
as
$child_status_key
=>
$child_status_value
)
{
foreach
(
$status_value
[
'children'
]
as
$child_status_key
=>
$child_status_value
)
{
...
@@ -95,7 +102,6 @@ if (isset($config['ipsec']['phase1'])) {
...
@@ -95,7 +102,6 @@ if (isset($config['ipsec']['phase1'])) {
}
}
}
}
}
}
}
}
}
if
(
isset
(
$config
[
'ipsec'
][
'phase2'
]))
{
if
(
isset
(
$config
[
'ipsec'
][
'phase2'
]))
{
...
...
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