Subject: Re: MACVLANs really best solution? How about a bridge with multiple bridge virtual interfaces?

From: Brian Haley <[email-masked]>
Date: Mon, 09 Mar 2009 14:33:28 -0400

Eric W. Biederman wrote:
> There are two tricky parts.
> 
> One problem is that macvlans and the primary hardware device share the
> same transmit queue.  So when I have a broadcast packet on the primary
> devices queue I don't know if I have already sent it out to the
> macvlan devices or not.
> 
> The second problem is that when I transmit a multicast packet and I
> have a local listener.  I believe replicating the packet both at the
> ip layer and at the ethernet layer will result in receiving the packet
> locally twice.

If you want a local listener to see the packet you have to set
IP_MULTICAST_LOOP.  A packet from a local source address coming off the "wire"
will be dropped in fib_validate_source(), it would have to come over lo.  I'm
not sure how that relates to how macvlan works, just something I've run into
before (2 nics in same subnet, listener on one, sender on other,
IP_MULTICAST_LOOP=0, no packets).

-Brian