Message ID | 20180402223105.19887-1-aconole@redhat.com |
---|---|
State | Not Applicable |
Headers | show |
Series | [ovs-dev] netlink-socket: don't check for namespace id under Windows | expand |
On Mon, Apr 02, 2018 at 06:31:05PM -0400, Aaron Conole wrote: > 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@redhat.com> > Signed-off-by: Aaron Conole <aconole@redhat.com> > --- Acked-by: Flavio Leitner <fbl@redhat.com> Thanks Aaron! fbl
> -----Mesaj original----- > De la: ovs-dev-bounces@openvswitch.org <ovs-dev- > bounces@openvswitch.org> În numele Flavio Leitner > Trimis: Tuesday, April 3, 2018 2:48 AM > Către: Aaron Conole <aconole@redhat.com> > Cc: dev@openvswitch.org; Alin Gabriel Serdean <aserdean@ovn.org> > Subiect: Re: [ovs-dev] [PATCH] netlink-socket: don't check for namespace id > under Windows > > On Mon, Apr 02, 2018 at 06:31:05PM -0400, Aaron Conole wrote: > > 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@redhat.com> > > Signed-off-by: Aaron Conole <aconole@redhat.com> > > --- > > Acked-by: Flavio Leitner <fbl@redhat.com> > > Thanks Aaron! > fbl > Thanks for trying to fix this Aaron and Flavio! I sent a patch yesterday on the same topic and Ben saw we missed the initialization part: https://mail.openvswitch.org/pipermail/ovs-dev/2018-April/345677.html Again, really thanks for trying to fix it 😊 Alin.
<aserdean@ovn.org> writes: >> -----Mesaj original----- >> De la: ovs-dev-bounces@openvswitch.org <ovs-dev- >> bounces@openvswitch.org> În numele Flavio Leitner >> Trimis: Tuesday, April 3, 2018 2:48 AM >> Către: Aaron Conole <aconole@redhat.com> >> Cc: dev@openvswitch.org; Alin Gabriel Serdean <aserdean@ovn.org> >> Subiect: Re: [ovs-dev] [PATCH] netlink-socket: don't check for namespace id >> under Windows >> >> On Mon, Apr 02, 2018 at 06:31:05PM -0400, Aaron Conole wrote: >> > 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@redhat.com> >> > Signed-off-by: Aaron Conole <aconole@redhat.com> >> > --- >> >> Acked-by: Flavio Leitner <fbl@redhat.com> >> >> Thanks Aaron! >> fbl >> > Thanks for trying to fix this Aaron and Flavio! > I sent a patch yesterday on the same topic and Ben saw we missed the > initialization part: > https://mail.openvswitch.org/pipermail/ovs-dev/2018-April/345677.html > Again, really thanks for trying to fix it 😊 D'oh! Sorry for the noise. I should have searched the list first. Glad it's good though - Thanks Alin! > Alin.
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) COVERAGE_INC(netlink_recv_jumbo); ofpbuf_put(buf, tail, retval - buf->allocated); } -#endif 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); } } +#endif log_nlmsg(__func__, 0, buf->data, buf->size, sock->protocol); COVERAGE_INC(netlink_received);
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@redhat.com> Signed-off-by: Aaron Conole <aconole@redhat.com> --- lib/netlink-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)