-
Notifications
You must be signed in to change notification settings - Fork 42
fix: avoid dialing/listening on dns addresses #131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a QUIC
variable define in mafmt
: https://godoc.org/github.com/multiformats/go-multiaddr-fmt#pkg-variables.
Should we use that one?
@@ -190,9 +190,12 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp | |||
}, nil | |||
} | |||
|
|||
// Don't use mafmt.QUIC as we don't want to dial DNS addresses. Just /ip{4,6}/udp/quic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂️ Sorry for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's confusing. We may want to just go ahead and revert the change in mafmt (we changed it from IP only to IP+DNS). But it does make sense to allow DNS there, just not here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Would you mind adding the unit test from transport_test.go in #126 here?
I completely forgot about that PR. |
See libp2p/go-libp2p#841