new: grabbing meta info from mDNS TXT records

This commit is contained in:
evilsocket 2018-08-30 14:55:38 +03:00
parent 3789b21ba1
commit 798df7e32f
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
4 changed files with 51 additions and 8 deletions

View file

@ -94,8 +94,15 @@ func (s *Session) startNetMon() {
existing, _ = s.Lan.Get(mac)
}
if existing != nil && existing.Hostname == "" && event.Hostname != "" {
existing.Hostname = event.Hostname
if existing != nil {
if existing.Hostname == "" && event.Hostname != "" {
existing.Hostname = event.Hostname
}
if event.Meta != nil {
for k, v := range event.Meta {
existing.Meta.Set(k, v)
}
}
}
}
}