OPNsense Forum

English Forums => Development and Code Review => Topic started by: olivier34 on February 08, 2025, 11:01:25 AM

Title: IGMP version in freebsd
Post by: olivier34 on February 08, 2025, 11:01:25 AM
Good morning,

My ISP required to send IGMPv2 frame to have IPTV. I tried to change the tunable "net.inet.igmp.default_version" to 2 and it is not working.

After some investigation I found that there is a commit in the main branch of FreeBSD https://github.com/freebsd/freebsd-src/commit/b94ec00ba73ef4769f62555bfcb840919143e198 to prevent fallback to IGMPv3 when "net.inet.igmp.default_version" is set to 2. Then I follow the guide which explains how to compile OPNSense, I compiled a custom kernel with the commit and I made also a change in igmp.c to initialise the interface with version 2
VNET_DEFINE_STATIC(int, igmp_default_version) = IGMP_VERSION_2;
To solve my problem, I have the following options :


My preference will go to option 2, however I have no idea if there are any side effect on additional code I have added to be sure that IGMPv2 will be used as soon as the interface is up. And I have not competencies to propose a code modification to initialise the IGMP version with the value stored in "net.inet.igmp.default_version".


Question 1 : In the OPNSense roadmap, is there any chance that IGMP will be updated soon to consider the "default_version" settings ?
Question 2 : Is there a trick to compile only the igmp part without recompiling the complete kernel ?

If you have other idea, do not hesitate to share.

Olivier

Title: Re: IGMP version in freebsd
Post by: Patrick M. Hausen on February 08, 2025, 12:33:36 PM
I suggest opening an issue on github for option #2.
Title: Re: IGMP version in freebsd
Post by: FraLem on February 09, 2025, 07:24:40 AM
Have you tried the os-igmp-proxy plugin?

It does send an IGMP V2 General query packet on the selected Downstream interface.

Regards 
Title: Re: IGMP version in freebsd
Post by: olivier34 on February 09, 2025, 10:27:48 AM
I have not indicated but yes, I use the os-igmp-proxy plugin. It is configurated to have LAN as downstream interface and WAN as upstream. In the option #4, IPTV is working correctly so it is not an issue with igmpproxy.

According information I have retrieved, the plugin is based igmpproxy from pali: https://github.com/pali/igmpproxy. However igmpproxy does not send directly the IGMP frame itself but rely on the kernel itself through the "IP_ADD_MEMBERSHIP" like for example in the following code https://github.com/pali/igmpproxy/blob/master/src/kern.c#L132