From: Remi Gacogne Date: Fri, 24 Feb 2017 15:42:55 +0000 (+0100) Subject: calidns: Use the correct socket family (IPv4 / IPv6) X-Git-Tag: rec-4.1.0-alpha1~251^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5085%2Fhead;p=thirdparty%2Fpdns.git calidns: Use the correct socket family (IPv4 / IPv6) --- diff --git a/pdns/calidns.cc b/pdns/calidns.cc index 5c5b7d6b76..9cdd58be8b 100644 --- a/pdns/calidns.cc +++ b/pdns/calidns.cc @@ -231,7 +231,7 @@ try vector sockets; ComboAddress dest(argv[2], 53); for(int i=0; i < 24; ++i) { - Socket *sock = new Socket(AF_INET, SOCK_DGRAM); + Socket *sock = new Socket(dest.sin4.sin_family, SOCK_DGRAM); // sock->connect(dest); setSocketSendBuffer(sock->getHandle(), 2000000); setSocketReceiveBuffer(sock->getHandle(), 2000000);