Files
vppn/peer/on_multicast.go
2026-06-07 09:33:21 +02:00

28 lines
377 B
Go

package peer
import "net/netip"
func (a *App) onMulticastDiscovery(e MulticastEvent) {
if a.isPublic {
return
}
peer, ok := a.peersByKey[e.pubKey]
if !ok {
return
}
if peer.IsPublic || peer.State() == StateDirect {
return
}
var v4, v6 netip.AddrPort
if e.endpoint.Addr().Is4() {
v4 = e.endpoint
} else {
v6 = e.endpoint
}
a.addProbe(peer, v4, v6)
}