Révision 859a5304
Ajouté par Renato Botelho il y a presque 10 ans
etc/inc/ipsec.inc | ||
---|---|---|
656 | 656 |
return $nbph2; |
657 | 657 |
} |
658 | 658 |
|
659 |
function ipsec_get_descr($ikeid) { |
|
660 |
global $config; |
|
661 |
|
|
662 |
if (!isset($config['ipsec']['phase1']) || |
|
663 |
!is_array($config['ipsec']['phase1'])) |
|
664 |
return ""; |
|
665 |
|
|
666 |
$descr = ''; |
|
667 |
$a_phase1 = $config['ipsec']['phase1']; |
|
668 |
foreach ($a_phase1 as $p1) { |
|
669 |
if ($p1['ikeid'] == $ikeid) { |
|
670 |
$descr = $p1['descr']; |
|
671 |
break; |
|
672 |
} |
|
673 |
} |
|
674 |
unset($a_phase1); |
|
675 |
|
|
676 |
return $descr; |
|
677 |
} |
|
678 |
|
|
679 |
function ipsec_get_descr_by_peerconfig($peerconfig) { |
|
680 |
return ipsec_get_descr(substr($peerconfig, strrpos($peerconfig, '-') + 1)); |
|
681 |
} |
|
682 |
|
|
659 | 683 |
function ipsec_disconnect_mobile($username) { |
660 | 684 |
if (empty($username)) |
661 | 685 |
return false; |
usr/local/www/diag_ipsec.php | ||
---|---|---|
116 | 116 |
?> |
117 | 117 |
<tr> |
118 | 118 |
<td class="listlr"> |
119 |
<?php echo htmlspecialchars($ikesa['peerconfig']);?>
|
|
119 |
<?php echo htmlspecialchars(ipsec_get_descr_by_peerconfig($ikesa['peerconfig']));?>
|
|
120 | 120 |
</td> |
121 | 121 |
<td class="listr"> |
122 | 122 |
<?php if (!is_array($ikesa['local'])) |
Formats disponibles : Unified diff
Fix #3665, show IPSec tunnel description on status page