Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Aug 2008 15:35:46 -0700
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, Sam Leffler <sam@freebsd.org>, net@freebsd.org, gnn@freebsd.org
Subject:   Re: Small patch to multicast code...
Message-ID:  <20080829223546.GG98483@citylink.fud.org.nz>
In-Reply-To: <20080829164145.GA47030@onelab2.iet.unipi.it>
References:  <m28wuohfm5.wl%gnn@neville-neil.com> <20080825190207.GA73478@zibbi.meraka.csir.co.za> <20080825194038.GA75840@zibbi.meraka.csir.co.za> <m2y72jx33z.wl%gnn@neville-neil.com> <20080826144130.S66593@maildrop.int.zabbadoz.net> <m2abezwojl.wl%gnn@neville-neil.com> <48B4A62D.3080300@freebsd.org> <20080829162853.GB46693@onelab2.iet.unipi.it> <48B8248A.3060103@freebsd.org> <20080829164145.GA47030@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080829223546.GG98483>