[ovs-dev] [PATCH] netlink-socket: don't check for namespace id under Windows

Aaron Conole aconole at redhat.com
Mon Apr 2 22:31:05 UTC 2018

The namespace identification is only relevant under Linux systems.
Even if it weren't, this code is targetted to Linux, and the Windows
control message structure doesn't look the same.

When building on Windows platform, the following error occurs:

  lib/netlink-socket.c(750) : error C2039: 'Control' : is not a member of 'msghdr'

Fixes: a86bd14 ("netlink: provide network namespace id from a msg.")
Cc: Flavio Leitner <fbl at redhat.com>
Signed-off-by: Aaron Conole <aconole at redhat.com>
 lib/netlink-socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c
index f3cce9314..699456e21 100644
--- a/lib/netlink-socket.c
+++ b/lib/netlink-socket.c
@@ -738,7 +738,6 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, int *nsid, bool wait)
         ofpbuf_put(buf, tail, retval - buf->allocated);
     if (nsid) {
         /* The network namespace id from which the message was sent comes
@@ -772,6 +771,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, int *nsid, bool wait)
             cmsg = CMSG_NXTHDR(&msg, cmsg);
     log_nlmsg(__func__, 0, buf->data, buf->size, sock->protocol);

More information about the dev mailing list