mirror of https://github.com/aredn/aredn.git
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:
parent
eae3e42ddd
commit
d8262e37e7
|
@ -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 "";
|
||||
|
|
Loading…
Reference in New Issue