connector: use nlmsg_len() to check message length
authorMathias Krause <[email protected]>
Mon, 30 Sep 2013 20:03:07 +0000 (22:03 +0200)
committerDavid S. Miller <[email protected]>
Wed, 2 Oct 2013 20:03:50 +0000 (16:03 -0400)
commit162b2bedc084d2d908a04c93383ba02348b648b0
tree374417ed599d2aa5c7e5920e0625e145ec4abb4f
parente727ca82e0e9616ab4844301e6bae60ca7327682
connector: use nlmsg_len() to check message length

The current code tests the length of the whole netlink message to be
at least as long to fit a cn_msg. This is wrong as nlmsg_len includes
the length of the netlink message header. Use nlmsg_len() instead to
fix this "off-by-NLMSG_HDRLEN" size check.

Cc: [email protected] # v2.6.14+
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/connector/connector.c