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: auth-4.0.4-rc1~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5174%2Fhead;p=thirdparty%2Fpdns.git calidns: Use the correct socket family (IPv4 / IPv6) (cherry picked from commit 7f363f60451fa8e54508c2628be122a8eb021b53) --- diff --git a/pdns/calidns.cc b/pdns/calidns.cc index 2a7460f72b..673518f9da 100644 --- a/pdns/calidns.cc +++ b/pdns/calidns.cc @@ -225,7 +225,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);