lkml.org 
[lkml]   [2002]   [Sep]   [14]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromBart De Schuymer <>
SubjectRe: bridge-netfilter patch
DateSat, 14 Sep 2002 09:05:40 +0200
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 12:28    [W:0.460 / U:0.010 seconds]
©2003-2008 Jasper Spaans