mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 07:05:06 +03:00
Response filtering improved
This commit is contained in:
parent
21fa0eb4ff
commit
4c00928400
1 changed files with 6 additions and 0 deletions
|
@ -348,7 +348,13 @@ func (s *mDNSServer) listen() {
|
||||||
s.mdns.log.Debugln("Stopped listening for mDNS on", s.intf.Name)
|
s.mdns.log.Debugln("Stopped listening for mDNS on", s.intf.Name)
|
||||||
return
|
return
|
||||||
case entry := <-incoming:
|
case entry := <-incoming:
|
||||||
|
if entry == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
suffix := fmt.Sprintf("%s.%s", MDNSService, MDNSDomain)
|
suffix := fmt.Sprintf("%s.%s", MDNSService, MDNSDomain)
|
||||||
|
if len(entry.Name) <= len(suffix) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if entry.Name[len(entry.Name)-len(suffix):] != suffix {
|
if entry.Name[len(entry.Name)-len(suffix):] != suffix {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue