Skip to content

Commit 60241db

Browse files
committed
circuitv2: don't check ASN for private addrs
1 parent 2b57e26 commit 60241db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

p2p/protocol/circuitv2/relay/constraints.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (c *constraints) AddReservation(p peer.ID, a ma.Multiaddr) error {
7474

7575
var asnReservations []time.Time
7676
var asn string
77-
if ip.To4() == nil {
77+
if ip.To4() == nil && manet.IsPublicAddr(a) {
7878
asn, _ = asnutil.Store.AsnForIPv6(ip)
7979
if asn != "" {
8080
asnReservations = c.asns[asn]

0 commit comments

Comments
 (0)