summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-01-12 21:50:26 -0200
committerRenato Botelho <garga@FreeBSD.org>2015-01-12 21:50:41 -0200
commitf285d039255f8536d135578125be4f5c76ccd24a (patch)
tree282a824dceff24b432b1c448e37fc0f9296b53e6 /usr/local/www/widgets
parenta9402b961bb0304c36fa4b717e61fedcd96c99f7 (diff)
downloadpfsense-f285d039255f8536d135578125be4f5c76ccd24a.zip
pfsense-f285d039255f8536d135578125be4f5c76ccd24a.tar.gz
Fix IPsec widget for multiple P2, it fixes #4164
Diffstat (limited to 'usr/local/www/widgets')
-rw-r--r--usr/local/www/widgets/widgets/ipsec.widget.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/local/www/widgets/widgets/ipsec.widget.php b/usr/local/www/widgets/widgets/ipsec.widget.php
index ee17a29..d53adf8 100644
--- a/usr/local/www/widgets/widgets/ipsec.widget.php
+++ b/usr/local/www/widgets/widgets/ipsec.widget.php
@@ -93,8 +93,18 @@ if (isset($config['ipsec']['phase1'])) { ?>
$found = false;
foreach ($ipsec_status['query']['ikesalist']['ikesa'] as $ikesa) {
- if ($ikeid == $ikesa['peerconfig']) {
+ if (isset($ikesa['childsalist']) && isset($ikesa['childsalist']['childsa'])) {
+ foreach($ikesa['childsalist']['childsa'] as $childsa) {
+ if ($ikeid == $childsa['childconfig']) {
+ $found = true;
+ break;
+ }
+ }
+ } else if ($ikeid == $ikesa['peerconfig']) {
$found = true;
+ }
+
+ if ($found === true) {
if ($ikesa['status'] == 'established') {
/* tunnel is up */
$iconfn = "true";
@@ -104,6 +114,7 @@ if (isset($config['ipsec']['phase1'])) { ?>
$iconfn = "false";
$inactivecounter++;
}
+ break;
}
}
OpenPOWER on IntegriCloud