On 04/10/13(Fri) 21:52, Brad Smith wrote:
> On Fri, Oct 04, 2013 at 03:18:45PM +0200, Martin Pieuchot wrote:
> > tl;dr
> > 
> >   This diff stop (ab)using the actual SIOC{ADD,DEL}MULTI ioctls with a
> > magic value for the whole range of multicast addresses used for IPv4/6
> > to turn the interface into promiscuous mode.
> > 
> > 
> > Long story
> > 
> >   Ethernet multicast records are currently represented by the ``struct
> > ether_multi'' as range of addresses between enm_addrlo and enm_addrlhi.
> > But most of the time this range represents a single address (lo == hi),
> > and the only cases where this is not true are changed below.
> > 
> > What happens in our drivers, is that as soon as the list of Ethernet
> > multicast records associated to an interface contains a range, we set
> > the IFF_ALLMULTI flag which turns the promiscuous mode on.  So the
> > diff below directly set the interface into promiscuous mode instead
> > of relying on this overcomplicated feature.
> 
> Well there is a difference between promiscuity for multicast traffic
> and what is usually refered to as promiscuous mode.

Yeah, I clearly overlooked the driver code.

> > Apart from helping me to reduce the complexity of the multicast
> > representation, which could be represented as one address instead of a
> > range, this diff has another benefit.  With it, the IFF_ALLMULTI flag
> > is now set on an interface only if we try to configure more multicast
> > filters than it can handle (hardware limit).
> 
> The last part isn't true.

Erf, I wanted to not set IFF_ALLMULTI when IFF_PROMISC was requested
but now that you pointed out that these two modes are set differently,
I'm not sure if there's a way to move forward without modifying all the
drivers :/

Reply via email to