Cleanup - audit
This commit is contained in:
1 parent
111f3f4d20
commit
c356347cf6
1 file changed
+1
-5
@@ -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