Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-04-16 12:58:20 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-04-16 12:58:20 +0400
commitc0efb4de1c53f16b9af12584a921d00a3af23cfd (patch)
tree6e43c4ad94d4434936e9ec47a469bcb1ea2173de /winsup/cygwin/net.cc
parentb5a7cb02cd9d4050d5985a355c9931eae55246bb (diff)
* net.cc (cygwin_setsockopt): Ignore IPV6_TCLASS the same way as IP_TOS.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc11
1 files changed, 10 insertions, 1 deletions
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 ();
}