Skip to content

Commit

Permalink
discovery: ensure target host for DNS fallback is fully qualified
Browse files Browse the repository at this point in the history
In this commit, fix the inability of some users to connect to the DNS
seed using our direct TCP fallback. We do this as some resolvers filter
out our large SRV requests due to their size (they also include public
keys). Instead, we’ll use a direct TCP resolution in this case.
However, after a recent change, we forgot the period at the end of the
target DNS host. This is an issue as the domain needs to be fully
qualified.

The fix is easy, add a period within our string formatting to target
the proper sub-domain and SRV target.

Fixes #854.
  • Loading branch information
Roasbeef committed Mar 18, 2018
1 parent 47329c9 commit ce85632
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discovery/bootstrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func fallBackSRVLookup(soaShim string, targetEndPoint string) ([]*net.SRV, error
return nil, err
}

dnsHost := fmt.Sprintf("_nodes._tcp.%v", targetEndPoint)
dnsHost := fmt.Sprintf("_nodes._tcp.%v.", targetEndPoint)
dnsConn := &dns.Conn{Conn: conn}
defer dnsConn.Close()

Expand Down

0 comments on commit ce85632

Please sign in to comment.