Ethernet Bridge development
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Or Gerlitz <ogerlitz@voltaire.com>
Cc: bridge@lists.linux-foundation.org
Subject: Re: [Bridge] NIC unicast macs table manipulation by bridge
Date: Tue, 21 Apr 2009 07:59:23 -0700	[thread overview]
Message-ID: <20090421075923.39861576@nehalam> (raw)
In-Reply-To: <Pine.LNX.4.64.0904211307060.6460@zuben.voltaire.com>

On Tue, 21 Apr 2009 14:19:00 +0300 (IDT)
Or Gerlitz <ogerlitz@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)?
> 
> Or.
Look closer...

/* 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)
		return -EINVAL;

	if (dev->netdev_ops->ndo_start_xmit == br_dev_xmit)
		return -ELOOP;

	if (dev->br_port != NULL)
		return -EBUSY;

	p = new_nbp(br, dev);
	if (IS_ERR(p))
		return PTR_ERR(p);

	err = dev_set_promiscuity(dev, 1);

This turns on promiscuous mode (and nests).

  reply	other threads:[~2009-04-21 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-21 11:19 [Bridge] NIC unicast macs table manipulation by bridge Or Gerlitz
2009-04-21 14:59 ` Stephen Hemminger [this message]
2009-04-22 14:18 ` Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090421075923.39861576@nehalam \
    --to=shemminger@linux-foundation.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=ogerlitz@voltaire.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox