IP_MAX_MEMBERSHIPS

Bruce M Simpson bms at spc.org
Thu Apr 13 06:32:19 UTC 2006


On Wed, Apr 12, 2006 at 10:34:13PM -0400, Stephen Clark wrote:
> Can anyone tell me why the maximum number of members in a multicast 
> group is set at
> 20?
> Are there issues with increasing this number?

Why would one wish to join more than 20 groups on a single socket?

I realize making such a statement leaves me wide open to the charge of
640KB being enough for anyone, but...

This limit in no way affects multicast routing, btw. Based on my reading
of the code...

This is a per-socket limit. The structures to support per-socket multicast
group membership are simple linked lists or statically allocated arrays.
The reason for this is so as not to break the ABI for struct ip_moptions
which has been present since 4.4BSD.

Changing this structure to not use the static allocation would probably
break your kernel for modules compiled without such a change. Also there
are IGMP timers involved.

The other poster who replied is probably talking about a per-interface-card
limit to do with the multicast hash filter on most Ethernet cards - this
is a hard limit, and the driver/hardware has to either support multicast
promiscuous mode (IFF_ALLMULTI) or be able to support full promiscuous mode
(which may not work correctly with IP forwarding in my experience).

Patches to refactor kernel multicast system gladly accepted!

Regards,
BMS

P.S. Someone was meant to be porting IGMPv3/SSM but there were licensing
issues with Apple.


More information about the freebsd-stable mailing list