Skip to content

Commit

Permalink
circuitv2: don't check ASN for private addrs
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Oct 19, 2023
1 parent 2b57e26 commit 60241db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/protocol/circuitv2/relay/constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (c *constraints) AddReservation(p peer.ID, a ma.Multiaddr) error {

var asnReservations []time.Time
var asn string
if ip.To4() == nil {
if ip.To4() == nil && manet.IsPublicAddr(a) {
asn, _ = asnutil.Store.AsnForIPv6(ip)
if asn != "" {
asnReservations = c.asns[asn]
Expand Down

0 comments on commit 60241db

Please sign in to comment.