From: Michal 'vorner' Vaner Date: Thu, 22 Dec 2011 10:16:35 +0000 (+0100) Subject: [805] Provide correct address family X-Git-Tag: trac2351_base~304^2~16^2~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7df24d2d83828d3e7a0652a83c1736a5aa79ced;p=thirdparty%2Fkea.git [805] Provide correct address family --- diff --git a/src/lib/server_common/portconfig.cc b/src/lib/server_common/portconfig.cc index 3f2a3169ce..8705f2aac8 100644 --- a/src/lib/server_common/portconfig.cc +++ b/src/lib/server_common/portconfig.cc @@ -92,6 +92,7 @@ setAddresses(DNSService& service, const AddressList& addresses) { } current_sockets.clear(); BOOST_FOREACH(const AddressPair &address, addresses) { + bool is_v6(IOAddress(address.first).getFamily() == AF_INET6); // TODO: Support sharing somehow in future. const SocketRequestor::SocketID tcp(socketRequestor().requestSocket(SocketRequestor::TCP, @@ -100,7 +101,7 @@ setAddresses(DNSService& service, const AddressList& addresses) { "dummy_app")); current_sockets.push_back(tcp.second); if (!test_mode) { - service.addServerTCP(tcp.first, true); // FIXME: Correct the flag + service.addServerTCP(tcp.first, is_v6); } const SocketRequestor::SocketID udp(socketRequestor().requestSocket(SocketRequestor::UDP, @@ -109,7 +110,7 @@ setAddresses(DNSService& service, const AddressList& addresses) { "dummy_app")); current_sockets.push_back(udp.second); if (!test_mode) { - service.addServerUDP(udp.first, true); // FIXME: Correct the flag + service.addServerUDP(udp.first, is_v6); } } }