diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b959d74d3..13fa1c6a9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2014-04-16 Corinna Vinschen + + * net.cc (cygwin_setsockopt): Ignore IPV6_TCLASS the same way as IP_TOS. + 2014-04-12 Corinna Vinschen * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix gid evaluation 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 (); }