From c0efb4de1c53f16b9af12584a921d00a3af23cfd Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 16 Apr 2014 08:58:20 +0000 Subject: * net.cc (cygwin_setsockopt): Ignore IPV6_TCLASS the same way as IP_TOS. --- winsup/cygwin/net.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/net.cc') diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 480570033..0e7776029 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -848,13 +848,22 @@ cygwin_setsockopt (int fd, int level, int optname, const void *optval, Sidenote: The reasoning for dropping ToS in Win2K is that ToS per RFC 1349 is incompatible with DiffServ per RFC 2474/2475. - We just ignore the return value of setting IP_TOS entirely. */ + We just ignore the return value of setting IP_TOS entirely. + + CV 2014-04-16: Same for IPV6_TCLASS + FIXME: Same for IPV6_RECVTCLASS? */ if (level == IPPROTO_IP && optname == IP_TOS && WSAGetLastError () == WSAEINVAL) { debug_printf ("Faked IP_TOS success"); res = 0; } + else if (level == IPPROTO_IPV6 && optname == IPV6_TCLASS + && WSAGetLastError () == WSAENOPROTOOPT) + { + debug_printf ("Faked IPV6_TCLASS success"); + res = 0; + } else set_winsock_errno (); } -- cgit v1.2.3