From 78b8b307663b523964d728b39c9c8d51a544417a Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 14 Aug 2011 15:27:20 -0400 Subject: Fixed resolving hosts when connecting to our uplink --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 401431683..875e4eeb6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -191,7 +191,8 @@ static void Connect() if (!Config->LocalHost.empty()) UplinkSock->Bind(Config->LocalHost); FOREACH_MOD(I_OnPreServerConnect, OnPreServerConnect()); - UplinkSock->Connect(u->host, u->port); + DNSRecord req = DNSManager::BlockingQuery(u->host, u->ipv6 ? DNS_QUERY_AAAA : DNS_QUERY_A); + UplinkSock->Connect(req.result, u->port); } /*************************************************************************/ -- cgit