bugfix: Ensure ip2hostname returns shortname

Needed to minimize size of OLSR advertisements and
ensure correctness of links in mesh status page

fixes #66
This commit is contained in:
Joe AE6XE 2018-07-15 08:17:43 -07:00
parent eae3e42ddd
commit d8262e37e7
1 changed files with 1 additions and 1 deletions

View File

@ -489,7 +489,7 @@ sub ip2hostname
$reverse_ip=join ".",reverse(split /\./,$ip);
foreach(`nslookup $ip`)
{
next unless ($host) = /^$reverse_ip\.in-addr\.arpa[ \t]+name[ \t]+=[ \t]+(\S+)/;
next unless ($host) = /^$reverse_ip\.in-addr\.arpa[ \t]+name[ \t]+=[ \t]+(\S+)\.local\.mesh/;
return $host;
}
return "";