2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

socket-util: Fix dscp error check for Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Gurucharan Shetty
2014-03-17 09:19:24 -07:00
parent e935fc32fa
commit fc48c3ba30

View File

@@ -120,14 +120,22 @@ set_dscp(int fd, uint8_t dscp)
success = false;
val = dscp << 2;
if (setsockopt(fd, IPPROTO_IP, IP_TOS, &val, sizeof val)) {
#ifndef _WIN32
if (sock_errno() != ENOPROTOOPT) {
#else
if (sock_errno() != WSAENOPROTOOPT) {
#endif
return sock_errno();
}
} else {
success = true;
}
if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, &val, sizeof val)) {
#ifndef _WIN32
if (sock_errno() != ENOPROTOOPT) {
#else
if (sock_errno() != WSAENOPROTOOPT) {
#endif
return sock_errno();
}
} else {