This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 8eaad3da7e604b97fe3dc9c34d3094aad3bed3b1
Author: Masaori Koshiba <masa...@apache.org>
AuthorDate: Fri Aug 18 14:32:45 2017 +0900

    Set IPV6_V6ONLY socket option
---
 iocore/net/UnixUDPNet.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/iocore/net/UnixUDPNet.cc b/iocore/net/UnixUDPNet.cc
index b925c05..c6d4602 100644
--- a/iocore/net/UnixUDPNet.cc
+++ b/iocore/net/UnixUDPNet.cc
@@ -595,6 +595,10 @@ UDPNetProcessor::UDPBind(Continuation *cont, sockaddr 
const *addr, int send_bufs
     }
   }
 
+  if (ats_is_ip6(addr) && (res = safe_setsockopt(fd, IPPROTO_IPV6, 
IPV6_V6ONLY, SOCKOPT_ON, sizeof(int))) < 0) {
+    goto Lerror;
+  }
+
   if ((res = socketManager.ink_bind(fd, addr, ats_ip_size(addr))) < 0) {
     goto Lerror;
   }
@@ -630,6 +634,8 @@ Lerror:
   if (fd != NO_FD) {
     socketManager.close(fd);
   }
+  Debug("udpnet", "Error: %s (%d)", strerror(errno), errno);
+
   cont->handleEvent(NET_EVENT_DATAGRAM_ERROR, nullptr);
   return ACTION_IO_ERROR;
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.

Reply via email to