fix: protecting concurrent access to LAN hosts

This commit is contained in:
evilsocket 2018-02-20 11:33:30 +01:00
commit 241db0cc66
6 changed files with 43 additions and 23 deletions

View file

@ -23,8 +23,7 @@ func vIP(ip net.IP) string {
}
address := ip.String()
host := session.I.Lan.Get(address)
host := session.I.Lan.GetByIp(address)
if host != nil {
if host.Hostname != "" {
return host.Hostname