From owner-freebsd-net@FreeBSD.ORG Fri Aug 29 23:03:53 2008 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17A141065678; Fri, 29 Aug 2008 23:03:53 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id C66038FC1B; Fri, 29 Aug 2008 23:03:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id C33382BD50; Sat, 30 Aug 2008 10:35:52 +1200 (NZST) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o2coYI1CYrOx; Sat, 30 Aug 2008 10:35:49 +1200 (NZST) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Sat, 30 Aug 2008 10:35:47 +1200 (NZST) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id E689111430; Sat, 30 Aug 2008 10:35:46 +1200 (NZST) Date: Fri, 29 Aug 2008 15:35:46 -0700 From: Andrew Thompson To: Luigi Rizzo Message-ID: <20080829223546.GG98483@citylink.fud.org.nz> References: <20080825190207.GA73478@zibbi.meraka.csir.co.za> <20080825194038.GA75840@zibbi.meraka.csir.co.za> <20080826144130.S66593@maildrop.int.zabbadoz.net> <48B4A62D.3080300@freebsd.org> <20080829162853.GB46693@onelab2.iet.unipi.it> <48B8248A.3060103@freebsd.org> <20080829164145.GA47030@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080829164145.GA47030@onelab2.iet.unipi.it> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: "Bjoern A. Zeeb" , Sam Leffler , net@freebsd.org, gnn@freebsd.org Subject: Re: Small patch to multicast code... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 23:03:53 -0000 On Fri, Aug 29, 2008 at 06:41:45PM +0200, Luigi Rizzo wrote: > On Fri, Aug 29, 2008 at 09:32:10AM -0700, Sam Leffler wrote: > > Luigi Rizzo wrote: > ... > > >and to be more explicit - the result of m_pullup is that > > >the number of bytes specified as m_pullup argument are in > > >a private piece of memory -- the 'data' region within the mbuf -- so > > >you can freely play with them without trouble. > > > > > >That is why i suggested to just increase the argument to m_pullup > > >by the size of the udp header so one can overwrite the checksum > > >within the mbuf without touching the shared part in the cluster > > >(if any). > > > > > > > Hmm, never considered the m_pullup guaranteed a private copy (but I see > > it in the code). The original semantics were just that the data was > > contiguous. > > funny, i thought the guarantee of a writable copy was also part > of the original semantics :) The bridge code does a deep copy of the packet for each interface it broadcasts on due the firewall code modifying the headers. It sounds like this should just be a copy+pullup instead. Andrew