summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_arp.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-02-18 14:33:13 +0545
committerRenato Botelho <garga@FreeBSD.org>2015-02-23 16:18:05 -0300
commit4f5967b9a893447b936c06858183a2277ac5bb57 (patch)
tree43304d7fba1d8567563faf8904e1fd13ac083c7d /usr/local/www/diag_arp.php
parentce0e5d384d892beb80c39c47e7a91fc894e825a2 (diff)
downloadpfsense-4f5967b9a893447b936c06858183a2277ac5bb57.zip
pfsense-4f5967b9a893447b936c06858183a2277ac5bb57.tar.gz
diag_arp allow underscore in resolved host names
is_hostname() and is_domain() allow underscore in the names. So it is possible to have underscore in host names, for example in DHCP server static mapped entries I have some things like: 10.42.3.4 client-pc-01_LAN 10.42.3.5 client-pc-01_WIFI These reverse-resolve fine - 10.42.3.4 becomes client-pc-01_LAN But the preg_match here misses such names that have an underscore in them. I noticed this when looking into forum post: https://forum.pfsense.org/index.php?topic=88956.0
Diffstat (limited to 'usr/local/www/diag_arp.php')
-rw-r--r--usr/local/www/diag_arp.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/diag_arp.php b/usr/local/www/diag_arp.php
index ffe960f..16b3303 100644
--- a/usr/local/www/diag_arp.php
+++ b/usr/local/www/diag_arp.php
@@ -251,7 +251,7 @@ function _getHostName($mac,$ip) {
return $dhcpip[$ip];
else{
exec("host -W 1 " . escapeshellarg($ip), $output);
- if (preg_match('/.*pointer ([A-Za-z0-9.-]+)\..*/',$output[0],$matches)) {
+ if (preg_match('/.*pointer ([A-Za-z_0-9.-]+)\..*/',$output[0],$matches)) {
if ($matches[1] <> $ip)
return $matches[1];
}
OpenPOWER on IntegriCloud