From: JINMEI Tatuya Date: Sun, 1 Jan 2012 18:07:15 +0000 (+0000) Subject: [master] use TCP socket to emulate the scenario of duplicate bind(); X-Git-Tag: trac2351_base~310^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1293abbaa78190c5d464f220ff4b29d753e2e9df;p=thirdparty%2Fkea.git [master] use TCP socket to emulate the scenario of duplicate bind(); 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. --- diff --git a/src/bin/resolver/tests/resolver_config_unittest.cc b/src/bin/resolver/tests/resolver_config_unittest.cc index 71693312fa..2fced6b4cf 100644 --- a/src/bin/resolver/tests/resolver_config_unittest.cc +++ b/src/bin/resolver/tests/resolver_config_unittest.cc @@ -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) {