working on mdns collector

This commit is contained in:
evilsocket 2018-08-29 15:48:19 +03:00
commit f6bfd683ee
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 47 additions and 9 deletions

View file

@ -90,6 +90,12 @@ func (s *Session) startNetMon() {
existing := s.Lan.AddIfNew(addr, mac)
if existing != nil {
existing.LastSeen = time.Now()
} else {
existing, _ = s.Lan.Get(mac)
}
if existing != nil && existing.Hostname == "" && event.Hostname != "" {
existing.Hostname = event.Hostname
}
}
}