summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-02-28 19:30:27 +0000
committerErmal Luçi <eri@pfsense.org>2009-02-28 19:30:27 +0000
commit56e1d16eba68ed0809cc9e026c120e9daabe56c3 (patch)
tree25048f25c5c8c54e2cde79d412969ea73a7c5562 /etc/inc
parenta7db7d3ab81632ce2eae27208688a5fce1458a45 (diff)
downloadpfsense-56e1d16eba68ed0809cc9e026c120e9daabe56c3.zip
pfsense-56e1d16eba68ed0809cc9e026c120e9daabe56c3.tar.gz
Correctly show actions such as Connect/Disconnect on Status Interfaces page.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 900e654..a5dbd4a 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -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];
OpenPOWER on IntegriCloud