From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Subject: Re: How to avoid fragmentation Date: Tue, 25 Oct 2005 01:37:00 +0200 Message-ID: <435D701C.1080501@eurodev.net> References: <435D40ED.1080109@speedy.com.ar> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: netfilter-devel@lists.netfilter.org Return-path: To: Gervasio Bernal In-Reply-To: <435D40ED.1080109@speedy.com.ar> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Gervasio Bernal wrote: > I'm developing a new target extension and I need to add some extra data > and headers in TCP/UDP packets. But I'm having a problem: fragmentation. > In the header developed by me I add a new checksum field to verify the > integrity of that header. This works fine while there is no > fragmentation. If the packet is fragmented I can't recalculate that > checksum. > > Does someone know how to correct or avoid this? Or have experience with > fragmentation? Hm, still missing some information. You mean that you can't recalculate the checksum because the checksum part is missing, don't you? Use skb_header_pointer(...) to work with the headers, it's fragment-aware. -- Pablo