On Thu, Dec 27, 2018 at 03:23:07PM -0200, Martin Pieuchot wrote:
> On 26/12/18(Wed) 17:13, Denis Fondras wrote:
> > Interface needs IFF_MULTICAST when enabling IPv6 as per in6_ifattach().
> > When an address is configured, the interface joins multicast groups with
> > in6_joingroup() (hence use SIOCADDMULTI) but only if IFF_MULTICAST is set. 
> > It is
> > useful for interfaces extern-facing interfaces, not so much for internal 
> > (like
> > mpe) as they won't process all-{nodes, routers} packets.
> > 
> > We may remove the test in in6_ifattach() because there are many tests 
> > through
> > the stack. It works if I disable the test in in6_ifattach() and remove the
> > IFF_MULTICAST. However I haven't tested further so it may break elsewhere.
> 
> I think we could start by relaxing this check for pseudo-interfaces or
> point-to-point :)
> 
> Do you know any other pseudo-interface that set IFF_MULTICAST and handle
> the ioctls just because of this check?
> 

many don't do anything with SIOC{ADD,DEL}MULTI but have a case to handle it :
etherip, gif, gre, lo, pair, pppx, pppoe, tun, vether, vxlan.

But most of them also really handle multicast traffic, unlike mpe.

> Could you use `sa_family' to decide if you need to increment the
> counter?  This has the advantage of clearly explaining that this
> logic is here for MPLS which is the only code path passing an `sa'
> argument.
> 

I sent the diff without testing it fully and it has some issues. You should
better check the new one. Especially the considered "if" has been changed.

Reply via email to