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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user