diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-17 22:42:35 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-17 22:42:35 -0800 |
commit | a5de1d0383f668fecb7e3b9bf4263ec45cd5fd1d (patch) | |
tree | b8ff6d48592758367b476397bb0a64f1f8fe587c /src | |
parent | 1b7a57d7f88cab0a1968e8c886eac3629dc74617 (diff) |
Look at that. It seems that, indeed, IPv6 CAN get very retarded.
Diffstat (limited to 'src')
-rw-r--r-- | src/Socket.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Socket.cc b/src/Socket.cc index 052f6a8..ad7edaf 100644 --- a/src/Socket.cc +++ b/src/Socket.cc @@ -243,6 +243,11 @@ Balau::Socket::Socket() throw (GeneralException) : m_fd(socket(AF_INET6, SOCK_ST #else fcntl(m_fd, F_SETFL, O_NONBLOCK); #endif + + int on = 0; + int r = setsockopt(m_fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &on, sizeof(on)); + Assert(r == 0); + memset(&m_localAddr, 0, sizeof(m_localAddr)); memset(&m_remoteAddr, 0, sizeof(m_remoteAddr)); Printer::elog(E_SOCKET, "Creating a socket at %p", this); |