Re: Problem with ebtables target that changes frame protocol

From: Bart De Schuymer
Date: Tue Feb 24 2004 - 16:50:54 EST


On Monday 23 February 2004 23:41, Simon Barber wrote:
> I have written an ebtables target that changes the ethernet protocol of
> a received frame (it runs in the broute chain). I have been working on
> 2.4.21 sources - Unfortunately inside netif_rx the skb->protocol is
> looked at before the bridge code is called - and then acted upon after.
> Hence if the bridge code changes the protocol the incorrect protocol is
> used to process the frame.

As the variable type is only used after the bridge code, I think it is best to
postpone the initialization of type until after the bridge code. This is of
course of no concern to the standard 2.4 kernel (as ebtables isn't in 2.4).
This problem exists in the 2.6 kernel, however.
I'll make a fix for 2.6 later, unless someone beats me to it. I'm kind of busy
at the moment.

cheers,
Bart

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