[ovs-dev] [PATCH 4/4] lib/netlink-socket.c: fixes in nl_sock_recv__() on Windows
Nithin Raju
nithin at vmware.com
Sat Oct 18 18:35:54 UTC 2014
> @@ -548,6 +548,8 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf,
> bool wait)
> } else {
> if (retval >= buf->allocated) {
> ofpbuf_reinit(buf, retval);
> + nlmsghdr = ofpbuf_base(buf);
> + nlmsghdr->nlmsg_len = UINT32_MAX;
>
> [ANKUR]: Why are we assigning nlmsg_len to UINT32_MAX and not retval
> (aligned).
In a few lines above, nlmsgHdr was set to the base of the previous ofpbuf. My intention is to reset the value of nlmsghdr since we re-inited the ofpbuf. As part of the resetting the value of nlmsghdr to the previous state, I'm setting the value of 'nlmsghdr->nlmsg_len' to be UINT32_MAX. I agree that setting this particular value is not necessary, since nlmsghdr would get overwritten with the 'tail'. I can remove it if you insist.
thanks,
-- Nithin
More information about the dev
mailing list