lkml.org 
[lkml]   [2002]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: bridge-netfilter patch
Date
On Friday 13 September 2002 20:22, David S. Miller wrote:
> From: Lennert Buytenhek <buytenh@math.leidenuniv.nl>
> Date: Fri, 13 Sep 2002 14:45:18 +0200
>
> > You need to remove the IPv4 bits, that copy of the MAC has to happen
> > at a different layer, it does not belong in IPv4. At best, everyone
> > shouldn't eat that header copy.
>
> What if I make the memcpy conditional on "if (skb->physindev != NULL)"?
>
> First explain to me why the copy is needed for.

memcpy(skb2->data - 16, skb->data - 16, 16);

This is for purely bridged packets.
IP connection tracking first gathers all fragments, before the bridged IP
packets are sent out the packet is fragmented. However, since this
fragmenting actually happens while the IP packet "is in the bridge code", no
existing code makes sure the fragments' Ethernet headers are correctly
filled. Now, AFAIK an Ethernet header has length 14 bytes, so don't ask me
why the magic number 16 is used (Lennert got IP fragmenting fixed).
A nice comment in front of that copy is certainly needed...

--
cheers,
Bart

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.077 / U:8.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site