On Fri, Jun 09, 2006 at 01:16:00AM -0400, Andy Gay wrote: > > Yes, that works as well (I tried it!). Interesting... My patch was using > a construction of the form > NLMSG_LENGTH(NLMSG_ALIGN(len)) > while the first level expansion of NLMSG_SPACE(len) is > NLMSG_ALIGN(NLMSG_LENGTH(len)) > > Since it works both ways, it appears NLMSG_ALIGN and NLMSG_LENGTH can be > used in either order. Is that guaranteed, I wonder? Absolutely: NLMSG_ALIGN(NLMSG_LENGTH(len)) = NLMSG_ALIGN(len + NLMSG_ALIGN(NLMSG_HDRLEN)) = NLMSG_ALIGN(len) + NLMSG_ALIGN(NLMSG_HDRLEN) = NLMSG_LENGTH(NLMSG_ALIGN(len)) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - : send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html