Skip to content

Commit

Permalink
mdns: always use interface addresses
Browse files Browse the repository at this point in the history
We don't want to use the transformed/munged host addresses for local
announcements. Ideally, we'd take a more scientific approach to this (i.e.,
"host, please give me addresses relative to X") but we can't do that yet.
  • Loading branch information
Stebalien committed Jul 2, 2019
1 parent fbe833d commit 6a743e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/discovery/mdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ type mdnsService struct {

func getDialableListenAddrs(ph host.Host) ([]*net.TCPAddr, error) {
var out []*net.TCPAddr
for _, addr := range ph.Addrs() {
for _, addr := range ph.Network().InterfaceListenAddresses() {
na, err := manet.ToNetAddr(addr)
if err != nil {
continue
Expand Down

0 comments on commit 6a743e9

Please sign in to comment.