diff --git a/p2p/net/conn/dial.go b/p2p/net/conn/dial.go index 441db76e41a..29d5d4d2c44 100644 --- a/p2p/net/conn/dial.go +++ b/p2p/net/conn/dial.go @@ -144,7 +144,16 @@ func (d *Dialer) rawConnDial(ctx context.Context, raddr ma.Multiaddr, remote pee } } + useLocalAddr := true + for _, p := range raddr.Protocols() { + if p.Name == "utp" { + useLocalAddr = false + } + } defer log.EventBegin(ctx, "connDialManet", logdial).Done() + if !useLocalAddr { + madialer.LocalAddr = nil + } return madialer.Dial(raddr) }