Bug 242677 was fixed in FBSD 12 but since some time it is back in FBSD 13. The test script fro hps can be used to prove this. As I am unsure how to reopen a previously closed bug, I am opening a new one with the same title.
^Triage: Cc: reviewer of base r349369 .
On Tue Jul 2 12:57:26 2024 UTC, guido@gvr.org wrote: > Bug 242677 was fixed in FBSD 12 but since some time it is back in FBSD 13. The > test script fro hps can be used to prove this. As I am unsure how to reopen a > previously closed bug, I am opening a new one with the same title. I failed to reproduce on FreeBSD CURRENT. I see both the "to_ex" and later "to_in" messages on the interface. I'll attach test program, slightly simplified. It doesn't do same thing three time, also it now requires 192.168.1.55/24 alias on the interface.
Created attachment 251852 [details] mcasttest.c test program
I tested the test program on my system (13.3-RELEASE-p3) (tcpdump in backgroud while the test programs runs). As you can se there is no IGMP traffic after dropping mebership: Add membership 11:31:24.963688 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA)) 192.168.1.55 > 224.0.0.22: igmp v3 report, 1 group record(s) [gaddr 239.0.0.5 to_ex, 0 source(s)] ue0: inet 192.168.1.55 igmpv3 rv 2 qi 125 qri 10 uri 3 group 239.0.0.5 mode exclude mcast-macaddr 01:00:5e:00:00:05 group 224.0.0.1 mode exclude mcast-macaddr 01:00:5e:00:00:01 Drop membership ue0: inet 192.168.1.55 igmpv3 rv 2 qi 125 qri 10 uri 3 group 224.0.0.1 mode exclude mcast-macaddr 01:00:5e:00:00:01 Add membership 11:31:28.844795 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA)) 192.168.1.55 > 224.0.0.22: igmp v3 report, 1 group record(s) [gaddr 239.0.0.5 to_ex, 0 source(s)] 11:31:29.469683 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA)) 192.168.1.55 > 224.0.0.22: igmp v3 report, 1 group record(s) [gaddr 239.0.0.5 to_ex, 0 source(s)]
This bug was solved in 14-stable with the following commits to https://cgit.freebsd.org/src/commit/sys/netinet/in_mcast.c?h=stable/14&id=88e1bc06692ae4552462945c53b5047e8dad5929 and https://cgit.freebsd.org/src/commit/sys/netinet/in_mcast.c?h=stable/14&id=31ad232d85656af77726626decce6c2b7fd824f6
Nice, it took some time to get this merged to stable. But now it's fixed for when 14.2 arrives. :) Cheers, Franco