From owner-freebsd-pf@FreeBSD.ORG Mon Jul 2 01:11:57 2007 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4757B16A41F for ; Mon, 2 Jul 2007 01:11:57 +0000 (UTC) (envelope-from vchepkov@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by mx1.freebsd.org (Postfix) with ESMTP id 007BB13C455 for ; Mon, 2 Jul 2007 01:11:56 +0000 (UTC) (envelope-from vchepkov@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so329066anc for ; Sun, 01 Jul 2007 18:11:56 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:from:to:cc:references:subject:date:mime-version:content-type:content-transfer-encoding:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=C7TERski1EuABfZHdMiSH3GyFTAR+4ZuH4DpT1G4AzGgIc3tpxrDjSv22Z9hvHULeSue+480gNtOHJYfxn+B8HNv8/T8020NcTOrVtMmrDmFsMD5KpOART9KgcbZsQCcq5WbZh6seU6LUMQZbuw5cHTWT6wOnFgG8r7r5NPKfwY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:from:to:cc:references:subject:date:mime-version:content-type:content-transfer-encoding:x-priority:x-msmail-priority:x-mailer:x-mimeole; b=Rvw5xHMTI/XeAhdCorF5/00HTsFG8SmAmBMbJe8Zm+LAEyh4Wann4Tw7HelbWf8BQFIxVsbe7vKhNTbRn0420EPtl0Ubp1GMTxctTvMmkbkzhZYJ3aLmkrAt1991jiEPMK5Zdvq67YHv3VlCnR0tP08TNDJ7d5oM1vUkUfL/UmQ= Received: by 10.100.11.7 with SMTP id 7mr3372359ank.1183338716327; Sun, 01 Jul 2007 18:11:56 -0700 (PDT) Received: from d600 ( [70.109.59.182]) by mx.google.com with ESMTP id c29sm18587713anc.2007.07.01.18.11.54 (version=SSLv3 cipher=RC4-MD5); Sun, 01 Jul 2007 18:11:54 -0700 (PDT) Message-ID: <002401c7bc45$e7fa89f0$c40a0a0a@chepkov.lan> From: "Vadym Chepkov" To: "Max Laier" , References: <20070528224225.GC40678@registro.br><20070629000630.GA52912@cdnetworks.co.kr><200706291431.37159.max@love2party.net> <200706291505.05141.max@love2party.net> Date: Sun, 1 Jul 2007 21:11:22 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-6"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Cc: Hugo Koji Kobayashi Subject: Re: udp fragmentation X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2007 01:11:57 -0000 Max, I have applied the patch, seems to be working fine, thank you. Vadym Chepkov ----- Original Message ----- From: "Max Laier" To: Cc: "Hugo Koji Kobayashi" Sent: Friday, June 29, 2007 9:04 AM Subject: Re: udp fragmentation On Friday 29 June 2007, Max Laier wrote: > On Friday 29 June 2007, Pyun YongHyeon wrote: > > On Thu, Jun 28, 2007 at 10:56:01PM +0200, Max Laier wrote: > > > > > The only thing common about your setup seems to be the bge(4) > > > > > NIC. Can you try disabling hardware checksumming (ifconfig > > > > > -txcsum -rxcsum)? My test is over a hardware checksumming > > > > > fxp(4) card, though. > > > > > > > > Yes, this eliminated the issue. Bug in bge driver? > > > > > > Kind of - the driver claims to have done UDP checksum testing on > > > the fragment (which is impossible). The attached patch should fix > > > the issue for bge(4) and any other similar NIC. > > > > I guess bge(4) has Rx checksum offload bug on fragmented UDP > > datagrams. Since other hardwares with checksum offload capability > > does not show this issue, it could be related with UDP pseudo header > > calculation. How about disabling UDP pseudo header calculation? > > > > I don't have bge(4) hardwares so the patch is just guess work. > > In fact it doesn't seem broken at all, we would just have to do > something along the lines of ip_input.c::ip_reass() (line 1001 ff): >... > Have to ponder a bit, if this is easily possible in pf's reassembly. Works - see attached. Does anyone know of a tool to generate nasty fragments to really test this? Reordered / overlapping / etc. ? -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News