[PATCH 1/4] Properly account for alignment difference in nlmsg_len

Steve Grubb sgrubb at redhat.com
Wed May 11 12:27:18 UTC 2005


On Wednesday 11 May 2005 04:01, Chris Wright wrote:
> -                       nlh->nlmsg_len = skb->len - sizeof(*nlh);
> +                       nlh->nlmsg_len = skb->len - NLMSG_SPACE(0);

Out of curiosity, is the code in audit_send_reply correct?

        nlh              = NLMSG_PUT(skb, pid, seq, t, len - sizeof(*nlh));

This was the place in code that I used to convince myself that I should copy 
that idiom.

-Steve




More information about the Linux-audit mailing list