(E-Mail Removed) a écrit :
> On Jul 10, 2:42 am, Pascal Hambourg <boite-a-s...@plouf.fr.eu.org>
> wrote:
>
>>Maybe the bridge code does not like the 00:00:00:00:00:00 source address
>>for some reason (is it a valid source MAC address ?).
>
> Actually, I think you hit it right on the head here, Pascal. The
> release notes for the device mention this exact issue and its impact
> on Linux bridging.
>
>>If ebtables is available you can log frames in the kernel log at each
>>step through the bridge framework.
>
> I tried this, and I can see the traffic filtering through all the
> various layers on the way out, and nothing at all shows up on the way
> in, which I suppose indicates that the bridge never gets the packet,
> which seems odd because the traffic got through before I enabled
> bridging.
Actually the bridge code receives the frame, but checks the source MAC
address and drops it if it's considered invalid before passing it to the
first ebtables chain. I hoped that the drop occured later (for instance
the output ethernet device driver being unable to send frames with an
all-zero address) so it may have been possible to modify the source MAC
address with ebtables, but no luck. You may consider hacking the bridge
code in the kernel source if you want to allow those packets through.
============== Found in net/bridge/br_input.c =======================
int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb)
{
struct sk_buff *skb = *pskb;
const unsigned char *dest = eth_hdr(skb)->h_dest;
if (!is_valid_ether_addr(eth_hdr(skb)->h_source))
goto err;
============== Found in include/linux/etherdevice.h =================
/**
* is_valid_ether_addr - Determine if the given Ethernet address is valid
* @addr: Pointer to a six-byte array containing the Ethernet address
*
* Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not
* a multicast address, and is not FF:FF:FF:FF:FF:FF.
*
* Return true if the address is valid.
*/
static inline int is_valid_ether_addr(const u8 *addr)
{
/* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to
* explicitly check for it here. */
return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
}