I just upgraded from 4.4.x to 4.12.x and detected that igmp related settings are not set to default values (1, 20, 10): net.ipv4.igmp_link_local_mcast_reports = 0 net.ipv4.igmp_max_memberships = 0 net.ipv4.igmp_max_msf = 0 This is fixed if I enable IP_MULTICAST. Looks like a regression since some changes made to "Namespaceify" commit dcd87999d415d39cf2ae510bfed6b8206d778e1c and related commits.
Why should these sysctl have any values whatsoever when igmp is compiled out?
Good question. But I think is not related. I have some points here: (1) Why these values are set to non-zero in kernel before 4.5 even if IP_MULTICAST is not enabled. (2) if IGMP is compiled out why these files are present at all and can set any non-zero value. (3) why I can change these sysctl values and simple multicast apps like (UPNP/DLNA) works again without error setsockopt(3, SOL_IP, IP_ADD_MEMBERSHIP, {imr_multiaddr=inet_addr("239.255.255.250"), imr_interface=inet_addr("0.0.0.0")}, 8) = -1 ENOBUFS (No buffer space available)
1. Because before the commit you referenced they were initialized in tcp_sk_init(), whereas the commit moved them to igmp_net_init, which is the function dealing with any specific igmp init sequence. I though this made more sense from logical point of view. 2. They are present since they are not guarded by an #ifdef CONFIG_IP_MULTICAST, which indeed might be something I missed when I authored the patchset 3. It seems that the igmp.o object file is always compiled in. I also inspected where those sysctls are used when IP_MULTICAST is not enabled and indeed there are places where it's used irrespective of whether multicast is enabled or not. That is, there are portions of the network code which are always compiled in and enabled, such as ip_mc_join_group. So in this regard I do believe that indeed I introduced a regression. I will create a partial revert and send to the mailing list. Thanks for the report
Created attachment 257857 [details] gmp-Fix-regression-caused-by-igmp-sysctl-namespace-.patch Can you test the attached patch and see if it solves your issue?
Yes, the issue gone. Thank you :)
[ Upstream commit 1714020e42b17135032c8606f7185b3fb2ba5d78 ]