mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Correctly show actions such as Connect/Disconnect on Status Interfaces page.
This commit is contained in:
parent
a7db7d3ab8
commit
56e1d16eba
@ -3002,12 +3002,14 @@ function get_interface_info($ifdescr) {
|
||||
|
||||
unset($linkinfo);
|
||||
exec("/usr/bin/netstat -I " . $ifinfo['if'] . " -nWb -f link", $linkinfo);
|
||||
|
||||
$linkinfo = preg_split("/\s+/", $linkinfo[1]);
|
||||
if (preg_match("/\*$/", $linkinfo[0])) {
|
||||
if (preg_match("/{$ifinfo['if']}\*/", $linkinfo[0])) {
|
||||
$ifinfo['status'] = "down";
|
||||
} else {
|
||||
} else if (preg_match("/{$ifinfo['if']}/", $linkinfo[0])) {
|
||||
$ifinfo['status'] = "up";
|
||||
}
|
||||
} else
|
||||
$ifinfo['status'] = "down";
|
||||
|
||||
if (preg_match("/^enc|^tun|^ppp|^pptp|^ovpn/i", $ifinfo['if'])) {
|
||||
$ifinfo['inpkts'] = $linkinfo[3];
|
||||
|
||||
@ -48,10 +48,9 @@ if ($_GET['if']) {
|
||||
interface_bring_down($interface);
|
||||
} else if ($_GET['action'] == "Connect" || $_GET['action'] == "Renew") {
|
||||
interface_configure($interface);
|
||||
} else {
|
||||
header("Location: status_interfaces.php");
|
||||
exit;
|
||||
}
|
||||
header("Location: status_interfaces.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$pgtitle = array("Status","Interfaces");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user