From b4d73e97bae62b5eb18bcd216b603b69ce63297b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 20 May 2010 15:53:17 -0700 Subject: [PATCH] netlink: Fix bad assumption about nested Netlink attributes. I had assumed that nested Netlink attributes contained an entire Netlink message, including header. This is wrong: they contain only a series of attributes. Nothing in the tree actually used nested attributes until now, so this doesn't fix any existing bugs. --- lib/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netlink.c b/lib/netlink.c index 5f26feb4..de88a81e 100644 --- a/lib/netlink.c +++ b/lib/netlink.c @@ -772,7 +772,7 @@ static const size_t attr_len_range[][2] = { [NL_A_U64] = { 8, 8 }, [NL_A_STRING] = { 1, SIZE_MAX }, [NL_A_FLAG] = { 0, SIZE_MAX }, - [NL_A_NESTED] = { NLMSG_HDRLEN, SIZE_MAX }, + [NL_A_NESTED] = { 0, SIZE_MAX }, }; /* Parses the 'msg' starting at the given 'nla_offset' as a sequence of Netlink -- 2.30.2