nlmsg_ok comparison between signed and unsigned
nlmsg_ok comparison between signed and unsigned

The nlmsg_ok macro has a comparison between an int and a size_t
(unsigned int).  The C spec says the int is cast to unsigned int before
the comparison.  This is a problem as the audit system will send skb's
with skb->len == nlhhdr->nlmsg_len which are NOT aligned.  Thus you can
end up with remaining being negative.  So the comparison becomes

(unsigned int)(-1) >= (unsigned int)16

Which turns out to be true!  It should clearly be false.  So if we cast
the size_t to an int we get a signed comparison and it works.  (This is
what linux/netlink.h and all of the kernel netlink headers do)

Signed-off-by: Eric Paris <b0b36e3cd9ea4e5739ff430a3056fabf2fdb0376@redhat.com>
Signed-off-by: Thomas Graf <17c2d8920621522552b392f72d8fdb4d1e866b44@suug.ch>
(cherry picked from commit 5d53626100f3b747109d4fc05a6d4107b09df642)

tgraf/libnl-1.1-stable,Distrotech/libnl-1,Distrotech/libnl-1,tgraf/libnl-1.1-stable