connector: use nlmsg_len() to check message length
authorMathias Krause <minipli@googlemail.com>
Mon, 30 Sep 2013 20:03:07 +0000 (22:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 May 2014 05:53:35 +0000 (07:53 +0200)
commit3c1382ec8a0ae705e14985c7e0ba7781ce5ddf45
treea305f1860c4b052cba686844b27a132912864406
parentfa2b034479f59fcca4a218f357d37fe00f35554c
connector: use nlmsg_len() to check message length

[ Upstream commit 162b2bedc084d2d908a04c93383ba02348b648b0 ]

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: stable@vger.kernel.org # v2.6.14+
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/connector/connector.c