From: Marek Lindner Date: Thu, 21 May 2009 01:30:01 +0800 References: <1242819232-614-3-git-send-email-sven.eckelmann@gmx.de> <1242836756-2491-1-git-send-email-sven.eckelmann@gmx.de> In-Reply-To: <1242836756-2491-1-git-send-email-sven.eckelmann@gmx.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905210130.01798.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [PATCH2/2v2] [batman] Don't add size for netlink header twice in netlink request Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking 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 Great findings - the patches are in now. :-) Regards, Marek