discovery: ensure target host for DNS fallback is fully qualified
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.
This commit is contained in:
parent
47329c9267
commit
ce85632390
@ -298,7 +298,7 @@ func fallBackSRVLookup(soaShim string, targetEndPoint string) ([]*net.SRV, error
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
dnsHost := fmt.Sprintf("_nodes._tcp.%v", targetEndPoint)
|
dnsHost := fmt.Sprintf("_nodes._tcp.%v.", targetEndPoint)
|
||||||
dnsConn := &dns.Conn{Conn: conn}
|
dnsConn := &dns.Conn{Conn: conn}
|
||||||
defer dnsConn.Close()
|
defer dnsConn.Close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user