From: "Gael Mauleon" Subject: Re: Concerning ULOG and the MAC logging bug Date: Mon, 9 Dec 2002 20:28:27 +0100 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <002601c29fb9$260345b0$0200a8c0@KevlarPC> References: <003101c29ca5$289c8b40$0200a8c0@KevlarPC> <20021209183930.GN2223@sunbeam.de.gnumonks.org> Reply-To: "Gael Mauleon" Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Return-path: To: "Harald Welte" Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org Hi, I think I had read the ulog_packet struct the wrong way. That's why i was talking about the payload, but it was mistake. So the else is probably more efficient :) But in absolute, i think memset on a struct is probably more efficient than many strncpy in some "else" statements. Thx for the reply :) ----- Original Message ----- From: "Harald Welte" To: "Gael Mauleon" Cc: Sent: Monday, December 09, 2002 7:39 PM Subject: Re: Concerning ULOG and the MAC logging bug Indeed this is an alternative solution. The question is: What is more efficient: Memsetting the whole structure or a potential branch introduced by the 'else' clause. And: What do you mean by 'payload can be exploited with wrong data'. Are you talking about the to-be-logged packet which will become the payload of the netlink message? How could this contain wrong data? > And let me know if there is a better way to tell about bugs and put > some code changes. for code changes we usually use unified diff (diff -u) between original and changed code. It can easily be read by a human being and also automatically applied in case we really want to accept this change.