[Bridge] [PATCH] bridge: mark packets sent to any local mac address as PACKET_HOST

Maxime Bizon mbizon at freebox.fr
Thu Jun 26 11:15:59 UTC 2014

On Wed, 2014-06-25 at 16:13 -0700, Stephen Hemminger wrote:

> > The bridge code only set PACKET_HOST on packets sent to the bridge mac
> > address, packets sent to other local mac addresses are sent to upper
> > layers, but ignored because they are marked as PACKET_OTHERHOST.
> > 
> > Signed-off-by: Maxime Bizon <mbizon at freebox.fr>
> What are you trying to do? Bridge device itself only has one MAC address.
> Are you trying to run macvlan on top of bridge?
> We only respond to ARP with bridge's MAC address.

host1 uses a bridge with two interfaces: ethernet and wireless (AP mode
using hostapd)

for some reasons, hostapd kept adding and removing the interface from
the bridge, triggering a mac address of the bridge change each time (I
did not notice that).

Another host had a static arp entry for host1, using the ethernet mac
address, so its packets to host1 were randomly trashed depending on the
current mac of the bridge.

I have since fixed this by setting a static mac address on the bridge to
prevent dynamic change, but I thought this patch would prevent other
people from having the same bug in the future.

What do you think ?


More information about the Bridge mailing list