tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bridge(4) learning



Hi all,
I’ve started reworking the bridge(4) code a bit in order to do a better job of 
handling multicast and broadcast packets. It’s not a big rework, it’s mostly 
limited to bridge_input(). While looking at bridge_input(), I noticed the 
following code:

        if (bif->bif_flags & IFBIF_LEARNING)
                bridge_rtupdate(sc, eh->ether_shost, ifp, 0, IFBAF_DYNAMIC); 

It fairly obviously does the learning needed to actually do the bridging. It’s 
only run when we successfully unicast a packet through the bridge. i.e. we only 
learn source host addresses from packets when we already know where the 
destination host is. 

Surely we should (or could) be learning source host address from all incoming 
packets? 

Cheers,
Lloyd


Home | Main Index | Thread Index | Old Index