Ethernet Bridge development
 help / color / mirror / Atom feed
* [Bridge] NIC unicast macs table manipulation by bridge
@ 2009-04-21 11:19 Or Gerlitz
  2009-04-21 14:59 ` Stephen Hemminger
  2009-04-22 14:18 ` Or Gerlitz
  0 siblings, 2 replies; 3+ messages in thread
From: Or Gerlitz @ 2009-04-21 11:19 UTC (permalink / raw)
  To: shemminger; +Cc: bridge

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bridge] NIC unicast macs table manipulation by bridge
  2009-04-21 11:19 [Bridge] NIC unicast macs table manipulation by bridge Or Gerlitz
@ 2009-04-21 14:59 ` Stephen Hemminger
  2009-04-22 14:18 ` Or Gerlitz
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2009-04-21 14:59 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: bridge

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).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bridge] NIC unicast macs table manipulation by bridge
  2009-04-21 11:19 [Bridge] NIC unicast macs table manipulation by bridge Or Gerlitz
  2009-04-21 14:59 ` Stephen Hemminger
@ 2009-04-22 14:18 ` Or Gerlitz
  1 sibling, 0 replies; 3+ messages in thread
From: Or Gerlitz @ 2009-04-22 14:18 UTC (permalink / raw)
  To: shemminger; +Cc: bridge

On Tue, 21 Apr 2009, Or Gerlitz wrote:

> Using a Linux bridge I see that none of the interfaces is set to promiscuous mode

OKay, sorry for that. I was looking (2.6.29) on the output of /sbin/ifconfig
which is installed on my system through net-tools-1.60-73 - seems like it
ignores the IFF_PROMISC bit. Now, when looking on the device sysfs flags,
I see now the IFF_PROMISC (0x100) bit being set.

It turns out that this ifconfig is even more misleading, using
$ ifconfig eth1 promisc and later -promisc makes the output to show as now the
device is in the promiscuous state, and with -promisc as it doesn't - but in both
cases, the IFF_PROMISC bit setting done by the bridge remains steady
that is both interfaces connected to the bridge have the 0x1103 flags bit mask...

As for my other question - is there a method to display dev-&gt;uc_list
(e.g similar to /proc/net/dev_mcast)?

thanks,

Or.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-22 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-21 11:19 [Bridge] NIC unicast macs table manipulation by bridge Or Gerlitz
2009-04-21 14:59 ` Stephen Hemminger
2009-04-22 14:18 ` Or Gerlitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox