[Bridge] NIC unicast macs table manipulation by bridge
shemminger at linux-foundation.org
Tue Apr 21 07:59:23 PDT 2009
On Tue, 21 Apr 2009 14:19:00 +0300 (IDT)
Or Gerlitz <ogerlitz at voltaire.com> wrote:
> Using a Linux bridge I see that none of the interfaces is set to promiscuous
> mode but on the other hand I don't see any dev_unicast_xxx calls in the
> bridge code... for the case of one of the interfaces being a physical NIC
> (e.g eth1), what's the magic that makes the NIC RX filtering be willing
> to accept frames whos dest mac isn't the NIC "primary" unicast mac?
> Also is there a method to display dev->uc_list (e.g similar to /proc/net/dev_mcast)?
/* called with RTNL */
int br_add_if(struct net_bridge *br, struct net_device *dev)
struct net_bridge_port *p;
int err = 0;
if (dev->flags & IFF_LOOPBACK || dev->type != ARPHRD_ETHER)
if (dev->netdev_ops->ndo_start_xmit == br_dev_xmit)
if (dev->br_port != NULL)
p = new_nbp(br, dev);
err = dev_set_promiscuity(dev, 1);
This turns on promiscuous mode (and nests).
More information about the Bridge