2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00

v2 netlink-socket: Fix broken build on Windows

Skip network namespace id check on windows since we lack support
and integration for their equivalent at the moment.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Co-authored-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
---
v2: Integrate comments as suggested by Ben and add him as co author
This commit is contained in:
Alin Gabriel Serdean
2018-04-03 14:53:08 +03:00
parent 2062840612
commit 16b9bae89e

View File

@@ -747,6 +747,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, int *nsid, bool wait)
* namespace (no id). Latest kernels return a valid ID only if
* available or nothing. */
netnsid_set_local(nsid);
#ifndef _WIN32
cmsg = CMSG_FIRSTHDR(&msg);
while (cmsg != NULL) {
if (cmsg->cmsg_level == SOL_NETLINK
@@ -771,6 +772,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, int *nsid, bool wait)
cmsg = CMSG_NXTHDR(&msg, cmsg);
}
#endif
}
log_nlmsg(__func__, 0, buf->data, buf->size, sock->protocol);