Révision e952906e
Ajouté par Ermal il y a plus de 9 ans
etc/inc/ipsec.inc | ||
---|---|---|
676 | 676 |
return $descr; |
677 | 677 |
} |
678 | 678 |
|
679 |
function ipsec_disconnect_mobile($username) { |
|
680 |
if (empty($username)) |
|
681 |
return false; |
|
682 |
exec("/usr/local/sbin/racoonctl logout-user " . escapeshellarg($username)); |
|
683 |
} |
|
684 |
|
|
685 | 679 |
function ipsec_fixup_ip($ipaddr) { |
686 | 680 |
if (is_ipaddrv6($ipaddr) || is_subnetv6($ipaddr)) |
687 | 681 |
return Net_IPv6::compress(Net_IPv6::uncompress($ipaddr)); |
usr/local/www/diag_ipsec.php | ||
---|---|---|
59 | 59 |
} |
60 | 60 |
} else if ($_GET['act'] == 'ikedisconnect') { |
61 | 61 |
if (ctype_digit($_GET['ikeid'])) { |
62 |
mwexec("/usr/local/sbin/ipsec down con" . escapeshellarg($_GET['ikeid'])); |
|
62 |
if (!empty($_GET['ikesaid']) && ctype_digit($_GET['ikesaid'])) |
|
63 |
mwexec("/usr/local/sbin/ipsec down con" . escapeshellarg($_GET['ikeid']) . "[" . escapeshellarg($_GET['ikesaid']) . "]"); |
|
64 |
else |
|
65 |
mwexec("/usr/local/sbin/ipsec down con" . escapeshellarg($_GET['ikeid'])); |
|
63 | 66 |
} |
64 |
} else if ($_GET['act'] == 'disconnect') { |
|
65 |
if (!empty($_GET['user'])) { |
|
66 |
ipsec_disconnect_mobile($_GET['user']); |
|
67 |
sleep(1); |
|
68 |
$savemsg = gettext("Disconnected user") . " " . $_GET['user']; |
|
67 |
} else if ($_GET['act'] == 'childdisconnect') { |
|
68 |
if (ctype_digit($_GET['ikeid'])) { |
|
69 |
if (!empty($_GET['ikesaid']) && ctype_digit($_GET['ikesaid'])) |
|
70 |
mwexec("/usr/local/sbin/ipsec down con" . escapeshellarg($_GET['ikeid']) . "{" . escapeshellarg($_GET['ikesaid']) . "}"); |
|
69 | 71 |
} |
70 | 72 |
} |
71 | 73 |
|
... | ... | |
213 | 215 |
<a href="diag_ipsec.php?act=ikedisconnect&ikeid=<?php echo $con_id; ?>"> |
214 | 216 |
<img src ="/themes/<?php echo $g['theme']; ?>/images/icons/icon_service_stop.gif" alt="Disconnect VPN" title="Disconnect VPN" border="0"/> |
215 | 217 |
</a> |
218 |
<a href="diag_ipsec.php?act=ikedisconnect&ikeid=<?php echo $con_id; ?>&ikesaid=<?php echo $ikesa['id']; ?>"> |
|
219 |
<img src ="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" alt="Disconnect VPN Connection" title="Disconnect VPN Connection" border="0"/> |
|
220 |
</a> |
|
216 | 221 |
</center> |
217 | 222 |
<?php endif; ?> |
218 | 223 |
</td> |
... | ... | |
295 | 300 |
echo "Bytes-Out: " . htmlspecialchars($childsa['bytesout']) . "/Packets-Out: " . htmlspecialchars($childsa['packetsout']);; |
296 | 301 |
?> |
297 | 302 |
</td> |
303 |
<td class="listr nowrap"> |
|
304 |
<center> |
|
305 |
<a href="diag_ipsec.php?act=childdisconnect&ikeid=<?php echo $con_id; ?>&ikesaid=<?php echo $childsa['reqid']; ?>"> |
|
306 |
<img src ="/themes/<?php echo $g['theme']; ?>/images/icons/icon_x.gif" alt="Disconnect Child SA" title="Disconnect Child SA" border="0"/> |
|
307 |
</a> |
|
308 |
</center> |
|
309 |
</td> |
|
298 | 310 |
<td class="list nowrap"> |
299 | 311 |
|
300 | 312 |
</td> |
Formats disponibles : Unified diff
Remove traces of older implementation still present