Date: Fri, 22 Aug 2008 09:27:25 -0700 From: Sam Leffler <sam@freebsd.org> To: Luigi Rizzo <rizzo@iet.unipi.it> Cc: gnn@freebsd.org, "Bruce M. Simpson" <bms@freebsd.org>, net@freebsd.org Subject: Re: Small patch to multicast code... Message-ID: <48AEE8ED.7000301@freebsd.org> In-Reply-To: <20080822083020.GA57441@onelab2.iet.unipi.it> References: <m27iaa6v43.wl%gnn@neville-neil.com> <20080821203519.GA51534@onelab2.iet.unipi.it> <m23aky6ncl.wl%gnn@neville-neil.com> <48AE23FF.9070009@FreeBSD.org> <20080822083020.GA57441@onelab2.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
Luigi Rizzo wrote:
> On Fri, Aug 22, 2008 at 03:27:11AM +0100, Bruce M. Simpson wrote:
>
>> gnn@freebsd.org wrote:
>>
>>>> The only thing i can think of is that it's the UDP checksum,
>>>> residing beyond hlen, which is overwritten somewhere in the
>>>> call to if_simloop -- in which case perhaps a better fix is
>>>> to m_pullup() the udp header as well ?
>>>>
>>>>
>>> It is the checksum that gets trashed, yes.
>>> ...
>>> The m_*() routines actually have reasonable comments, it just seems
>>> the wrong one was used here.
>>>
>>>
>> Actually, m_copy() has been legacy for some time now -- see comments.
>>
>
> The API is undocumented, but in this specific function the reason
> for using one rather than the other is undocumented. Especially,
> if you use m_dup() then the call to m_pullup should be
> unnecessary.
>
> That's why I suggested to explain clearly what is wrong in the original
> code, so even if now we only apply a temporary bandaid (for lack of time,
> etc.) hopefully later this can be reverted to something more efficient
> such as pulling up the UDP header as well.
>
>
I agree that doing the deep copy is just papering over a bigger problem.
Sam
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48AEE8ED.7000301>
