netdev
[Top] [All Lists]

Re: [PATCH] Fix checksum bug for multicast/broadcast packets on postrout

To: Harald Welte <laforge@xxxxxxxxxxxxx>
Subject: Re: [PATCH] Fix checksum bug for multicast/broadcast packets on postrouting hook
From: James Morris <jmorris@xxxxxxxxxx>
Date: Tue, 17 Feb 2004 15:35:27 -0500 (EST)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040217155452.GA9464@sunbeam.de.gnumonks.org>
Sender: netdev-bounce@xxxxxxxxxxx
On Tue, 17 Feb 2004, Harald Welte wrote:

> On Sun, Feb 15, 2004 at 01:09:23AM -0500, James Morris wrote:

> > If the netfilter core code is modified instead, we will end up adding
> > skb_ip_make_writable() to nf_hook_slow() which will be called for every 
> > packet with an output device which uses hardware checksums.
> > 
> > Not sure which is worse, but here's a proposed patch which does this.
>  
> Why can't we somehow check inside the netfilter hook if the packet is
> at least multicast/broadcast (or even better: also locally generated)?

Well, we need to use skb_ip_make_writable() in any case (not just for
mcast/bcast packets), as we are modifying a part of the packet which 
may not be linear.  Note that this is only called for packets with an 
outdev, and does nothing if the transport layer checksum is writeable.


- James
--
James Morris
<jmorris@xxxxxxxxxx>



<Prev in Thread] Current Thread [Next in Thread>