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.