X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_dns.cpp;h=002686bc276157eb5b2ef91c8371dce2c88017b5;hb=9aadc251e9910998fbbe5438b461958a261eae1d;hp=4caea9c48a38aad9c726cf4427842692bf87d841;hpb=49b9c6bcb9746469c00619f6fe1d444326d42b60;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index 4caea9c48..002686bc2 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -688,7 +688,7 @@ class MyManager : public Manager, public Timer, public EventHandler irc::sockets::aptosa(dnsserver, DNS::PORT, myserver); /* Initialize mastersocket */ - int s = socket(myserver.sa.sa_family, SOCK_DGRAM, 0); + int s = socket(myserver.family(), SOCK_DGRAM, 0); this->SetFd(s); /* Have we got a socket? */ @@ -701,9 +701,9 @@ class MyManager : public Manager, public Timer, public EventHandler if (sourceaddr.empty()) { // set a sourceaddr for irc::sockets::aptosa() based on the servers af type - if (myserver.sa.sa_family == AF_INET) + if (myserver.family() == AF_INET) sourceaddr = "0.0.0.0"; - else if (myserver.sa.sa_family == AF_INET6) + else if (myserver.family() == AF_INET6) sourceaddr = "::"; } irc::sockets::aptosa(sourceaddr, sourceport, bindto); @@ -722,7 +722,7 @@ class MyManager : public Manager, public Timer, public EventHandler this->SetFd(-1); } - if (bindto.sa.sa_family != myserver.sa.sa_family) + if (bindto.family() != myserver.family()) ServerInstance->Logs->Log(MODNAME, LOG_SPARSE, "Nameserver address family differs from source address family - hostnames might not resolve"); } else