Revision 55d6f48b
Added by Renato Botelho almost 11 years ago
usr/local/www/diag_ipsec.php | ||
---|---|---|
114 | 114 |
<?php |
115 | 115 |
if (is_array($status['query']) && is_array($status['query']['ikesalist']) && is_array($status['query']['ikesalist']['ikesa'])) { |
116 | 116 |
foreach ($status['query']['ikesalist']['ikesa'] as $ikeid => $ikesa) { |
117 |
$con_id = substr($ikesa['peerconfig'], 3); |
|
118 |
|
|
117 | 119 |
if (ipsec_phase1_status($status['query']['ikesalist']['ikesa'], $ikesa['id'])) { |
118 | 120 |
$icon = "pass"; |
119 | 121 |
} elseif(!isset($config['ipsec']['enable'])) { |
... | ... | |
124 | 126 |
?> |
125 | 127 |
<tr> |
126 | 128 |
<td class="listlr"> |
127 |
<?php echo "({$ikesa['id']}) " . htmlspecialchars(ipsec_get_descr($ikesa['id']));?>
|
|
129 |
<?php echo htmlspecialchars(ipsec_get_descr($con_id));?>
|
|
128 | 130 |
</td> |
129 | 131 |
<td class="listr"> |
130 | 132 |
<?php if (!is_array($ikesa['local'])) |
... | ... | |
186 | 188 |
<td > |
187 | 189 |
<?php if ($icon != "pass"): ?> |
188 | 190 |
<center> |
189 |
<a href="diag_ipsec.php?act=connect&ikeid=<?php echo $ikesa['id']; ?>">
|
|
191 |
<a href="diag_ipsec.php?act=connect&ikeid=<?php echo $con_id; ?>">
|
|
190 | 192 |
<img src ="/themes/<?php echo $g['theme']; ?>/images/icons/icon_service_start.gif" alt="Connect VPN" title="Connect VPN" border="0"/> |
191 | 193 |
</a> |
192 | 194 |
</center> |
193 | 195 |
<?php else: ?> |
194 | 196 |
<center> |
195 |
<a href="diag_ipsec.php?act=ikedisconnect&ikeid=<?php echo $ikesa['id']; ?>">
|
|
197 |
<a href="diag_ipsec.php?act=ikedisconnect&ikeid=<?php echo $con_id; ?>">
|
|
196 | 198 |
<img src ="/themes/<?php echo $g['theme']; ?>/images/icons/icon_service_stop.gif" alt="Disconnect VPN" title="Disconnect VPN" border="0"/> |
197 | 199 |
</a> |
198 | 200 |
</center> |
... | ... | |
263 | 265 |
</td> |
264 | 266 |
</tr> |
265 | 267 |
<?php endif; |
268 |
|
|
269 |
unset($con_id); |
|
266 | 270 |
} |
267 | 271 |
} |
268 | 272 |
?> |
Also available in: Unified diff
id changes every time ipsec tunnel disconnects and reconnect, need to use peerconfig to get correct description. Ticket #3826