On Thursday 21 May 2009 00:25:56 Sven Eckelmann wrote:
The parameter len of NLMSG_LENGTH is only the size of the payload of the request. If we use this function to calculate the size of the buffer we send to the kernel we would add (sizeof(nlmsghdr)+padding) and the size of our own structure which also has a nlmsghdr included. We must split the req structure into a header part and the payload to calculate the correct size of our buffer and having the payload always start at the correct address.
Signed-off-by: Sven Eckelmann firstname.lastname@example.org
Great findings - the patches are in now. :-)