]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/dns.cpp
Fix sqllog compile error
[user/henk/code/inspircd.git] / src / dns.cpp
index 7be0f6874c16b9b43a1277ebaeea3e0c2e4f7cc3..80909c0bb4b8ef5eee6e97d424275174e3d69624 100644 (file)
@@ -306,13 +306,14 @@ void DNS::Rehash()
        irc::sockets::aptosa(ServerInstance->Config->DNSServer, DNS::QUERY_PORT, myserver);
 
        /* Initialize mastersocket */
-       int s = irc::sockets::OpenTCPSocket(ServerInstance->Config->DNSServer, SOCK_DGRAM);
+       int s = socket(myserver.sa.sa_family, SOCK_DGRAM, 0);
        this->SetFd(s);
-       ServerInstance->SE->NonBlocking(this->GetFd());
 
        /* Have we got a socket and is it nonblocking? */
        if (this->GetFd() != -1)
        {
+               ServerInstance->SE->SetReuse(s);
+               ServerInstance->SE->NonBlocking(s);
                /* Bind the port - port 0 INADDR_ANY */
                if (!ServerInstance->BindSocket(this->GetFd(), portpass, "", false))
                {