Subject: Re: multicast groups on unnumbered interfaces?
To: Nick Amato <naamato@nexthop.com>
From: Matt Thomas <matt@3am-software.com>
List: tech-net
Date: 09/25/2002 21:53:09
At 02:31 PM 9/25/2002, Nick Amato wrote:

>Is there a good reason why we can't join multicast groups on interfaces
>that have no address?  It doesn't seem like inm_ia in struct in_multi
>is used by much of anything.
>
>There seems to be some kludge code to store multicast addresses
>on interfaces that have lost their last IPv[46] address, for later
>restoration when an interface regains one.
>
>Yet, in_addmulti() in in.c does not allow for a multicast group to be added
>to an interface that does not have an address:
>
>                 IFP_TO_IA(ifp, ia);
>                 if (ia == NULL) {
>                         free(inm, M_IPMADDR);
>                         splx(s);
>                         return (NULL);
>                 }
>
>The IP_ADD_MEMBERSHIP code allows the interface index to be given
>using the 0/8 hack, but the code above does not let it work.

The above is why I recoded multicasts to not hang off the ifaddr but
have their own hash table like the normal address table.  It also scales
better. :)

It also get rid of the kludge mcast code in in.c which is a definite plus.
Alas, I can't contribute the code but the above should make it easy for
someone else to do since it's not that much code.

-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message