Commit f7df24d2 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[805] Provide correct address family

parent ddb94ad8
...@@ -92,6 +92,7 @@ setAddresses(DNSService& service, const AddressList& addresses) { ...@@ -92,6 +92,7 @@ setAddresses(DNSService& service, const AddressList& addresses) {
} }
current_sockets.clear(); current_sockets.clear();
BOOST_FOREACH(const AddressPair &address, addresses) { BOOST_FOREACH(const AddressPair &address, addresses) {
bool is_v6(IOAddress(address.first).getFamily() == AF_INET6);
// TODO: Support sharing somehow in future. // TODO: Support sharing somehow in future.
const SocketRequestor::SocketID const SocketRequestor::SocketID
tcp(socketRequestor().requestSocket(SocketRequestor::TCP, tcp(socketRequestor().requestSocket(SocketRequestor::TCP,
...@@ -100,7 +101,7 @@ setAddresses(DNSService& service, const AddressList& addresses) { ...@@ -100,7 +101,7 @@ setAddresses(DNSService& service, const AddressList& addresses) {
"dummy_app")); "dummy_app"));
current_sockets.push_back(tcp.second); current_sockets.push_back(tcp.second);
if (!test_mode) { if (!test_mode) {
service.addServerTCP(tcp.first, true); // FIXME: Correct the flag service.addServerTCP(tcp.first, is_v6);
} }
const SocketRequestor::SocketID const SocketRequestor::SocketID
udp(socketRequestor().requestSocket(SocketRequestor::UDP, udp(socketRequestor().requestSocket(SocketRequestor::UDP,
...@@ -109,7 +110,7 @@ setAddresses(DNSService& service, const AddressList& addresses) { ...@@ -109,7 +110,7 @@ setAddresses(DNSService& service, const AddressList& addresses) {
"dummy_app")); "dummy_app"));
current_sockets.push_back(udp.second); current_sockets.push_back(udp.second);
if (!test_mode) { if (!test_mode) {
service.addServerUDP(udp.first, true); // FIXME: Correct the flag service.addServerUDP(udp.first, is_v6);
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment