projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofp-util: ofputil_pull_ofp11_match: Allow OXM match
[openvswitch]
/
lib
/
socket-util.c
diff --git
a/lib/socket-util.c
b/lib/socket-util.c
index 2c5e6ccbe539759e4a0d1797844269dc03b47d25..7c40ab8330d6d298a59a8308986d4cf4e0baaf70 100644
(file)
--- a/
lib/socket-util.c
+++ b/
lib/socket-util.c
@@
-30,6
+30,7
@@
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <sys/uio.h>
#include <sys/un.h>
#include <unistd.h>
#include "dynamic-string.h"
#include <sys/un.h>
#include <unistd.h>
#include "dynamic-string.h"
@@
-94,12
+95,14
@@
xset_nonblocking(int fd)
static int
set_dscp(int fd, uint8_t dscp)
{
static int
set_dscp(int fd, uint8_t dscp)
{
+ int val;
+
if (dscp > 63) {
return EINVAL;
}
if (dscp > 63) {
return EINVAL;
}
-
dscp
= dscp << 2;
- if (setsockopt(fd, IPPROTO_IP, IP_TOS, &
dscp, sizeof dscp
)) {
+
val
= dscp << 2;
+ if (setsockopt(fd, IPPROTO_IP, IP_TOS, &
val, sizeof val
)) {
return errno;
}
return errno;
}