Cleanup - audit
This commit is contained in:
@@ -9,17 +9,13 @@ import (
|
||||
)
|
||||
|
||||
func (a *App) onMulticastDiscovery(pkt multicast.Packet) {
|
||||
if a.isPublic {
|
||||
return
|
||||
}
|
||||
|
||||
// Locate the sender peer by its VPN IP (final octet carried in the beacon).
|
||||
octets := a.vpnNet.Addr().As4()
|
||||
octets[3] = pkt.PeerIP
|
||||
vpnIP := netip.AddrFrom4(octets)
|
||||
|
||||
peer, ok := a.peersByIP[vpnIP]
|
||||
if !ok || peer.IsPublic || peer.State == StateDirect {
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user