]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] use TCP socket to emulate the scenario of duplicate bind();
authorJINMEI Tatuya <jinmei@isc.org>
Sun, 1 Jan 2012 18:07:15 +0000 (18:07 +0000)
committerJINMEI Tatuya <jinmei@isc.org>
Sun, 1 Jan 2012 18:07:15 +0000 (18:07 +0000)
on Solaris SO_REUSEADDR allow multiple UDP sockets bound to the same port
(seemingly for the old multicast extension).
committing it at my discretion as it's simple and the problem made buildbot
fail.

src/bin/resolver/tests/resolver_config_unittest.cc

index 71693312fac05e30ee4408975877fa0d663b4869..2fced6b4cfe9ef7e9d84556a7d6eccad81ccf7bf 100644 (file)
@@ -197,8 +197,8 @@ createSocket(const char* address, const char* port) {
     struct addrinfo hints, *res;
     memset(&hints, 0, sizeof(hints));
     hints.ai_family = AF_UNSPEC;
-    hints.ai_socktype = SOCK_DGRAM;
-    hints.ai_protocol = IPPROTO_UDP;
+    hints.ai_socktype = SOCK_STREAM;
+    hints.ai_protocol = IPPROTO_TCP;
     hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
     const int error = getaddrinfo(address, port, &hints, &res);
     if (error != 0) {