Audit changes
This commit is contained in:
@@ -58,10 +58,12 @@ func (a *App) onPing(e PingEvent) {
|
||||
peer.UpdateEndpoints(e.ping.SrcV4, e.ping.SrcV6)
|
||||
}
|
||||
|
||||
var cgnatPrefix = netip.MustParsePrefix("100.64.0.0/10")
|
||||
|
||||
func addrIsRoutable(addrPort netip.AddrPort) bool {
|
||||
if addrPort.Port() == 0 {
|
||||
return false
|
||||
}
|
||||
addr := addrPort.Addr()
|
||||
return addr.IsGlobalUnicast() && !addr.IsPrivate()
|
||||
return addr.IsGlobalUnicast() && !addr.IsPrivate() && !cgnatPrefix.Contains(addr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user