only use @ syntax when the dns port is not port 53

pull/1656/head
Jeff Becker 3 years ago
parent a6fbaa7c7a
commit db5862cda8
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -110,7 +110,11 @@ namespace llarp::dns
UnboundResolver::AddUpstreamResolver(const SockAddr& upstreamResolver)
{
std::stringstream ss;
ss << upstreamResolver.hostString() << "@" << upstreamResolver.getPort();
ss << upstreamResolver.hostString();
if (const auto port = upstreamResolver.getPort(); port != 53)
ss << "@" << port;
const auto str = ss.str();
if (ub_ctx_set_fwd(unboundContext, str.c_str()) != 0)
{

Loading…
Cancel
Save