Move multicasting into yggdrasil package

This commit is contained in:
Neil Alexander 2018-05-23 11:13:53 +01:00
parent 388ae09fca
commit 6f79184c9b
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
6 changed files with 196 additions and 129 deletions

View file

@ -341,11 +341,17 @@ func (iface *udpInterface) reader() {
if them.isValid() {
continue
}
if udpAddr.IP.IsLinkLocalUnicast() &&
!iface.core.ifceExpr.MatchString(udpAddr.Zone) {
continue
if udpAddr.IP.IsLinkLocalUnicast() {
if len(iface.core.ifceExpr) == 0 {
break
}
for _, expr := range iface.core.ifceExpr {
if expr.MatchString(udpAddr.Zone) {
iface.handleKeys(msg, addr)
break
}
}
}
iface.handleKeys(msg, addr)
case udp_isClose(msg):
iface.handleClose(msg, addr)
default: