diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-01-29 20:56:08 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-01-29 20:56:08 +0000 |
commit | c522fc918b7222a2dc832e6ab62df14b440143ed (patch) | |
tree | 6d6ab75dd9ace06028ae877222c048501d0d3162 | |
parent | d5c2fde54c4944e2b324fd53921577bf30febd02 (diff) | |
download | pfsense-c522fc918b7222a2dc832e6ab62df14b440143ed.zip pfsense-c522fc918b7222a2dc832e6ab62df14b440143ed.tar.gz |
MFC recent changes from Ryan
-rwxr-xr-x | usr/local/www/diag_dhcp_leases.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/diag_dhcp_leases.php b/usr/local/www/diag_dhcp_leases.php index 61624b4..e16709e 100755 --- a/usr/local/www/diag_dhcp_leases.php +++ b/usr/local/www/diag_dhcp_leases.php @@ -101,7 +101,7 @@ while($i < $leases_count) { } if ($data[$f] == "client-hostname") { if($data[$f] <> "") { - $leases[$i]['hostname'] = $data[$f+1]; + $leases[$i]['hostname'] = preg_replace('/"/','',$data[$f+1]); } else { $hostname = gethostbyaddr($leases[$i]['ip']); if($hostname <> "") { @@ -113,7 +113,7 @@ while($i < $leases_count) { if ($data[$f+1] == "ethernet") { $leases[$i]['mac'] = $data[$f+2]; /* check if it's online */ - $online = exec("/usr/sbin/arp -an |/usr/bin/grep {$d[0]}| grep {$leases[$i]['ip']}| /usr/bin/wc -l|/usr/bin/awk '{print $1;}'"); + $online = exec("/usr/sbin/arp -an |/usr/bin/grep {$leases[$i]['mac']}| grep {$leases[$i]['ip']}| /usr/bin/wc -l|/usr/bin/awk '{print $1;}'"); if ($online == 1) { $leases[$i]['online'] = 'online'; } else { |