diff --git a/src/ip.cpp b/src/ip.cpp index bc4251d3..81607656 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -167,6 +167,19 @@ void zmq::set_ip_type_of_service (fd_t s_, int iptos) { int rc = setsockopt(s_, IPPROTO_IP, IP_TOS, reinterpret_cast(&iptos), sizeof(iptos)); +#ifdef ZMQ_HAVE_WINDOWS + wsa_assert (rc != SOCKET_ERROR); +#else + errno_assert (rc == 0); +#endif + + rc = setsockopt( + s_, + IPPROTO_IPV6, + IPV6_TCLASS, + reinterpret_cast(&iptos), + sizeof(iptos)); + #ifdef ZMQ_HAVE_WINDOWS wsa_assert (rc != SOCKET_ERROR); #else