Bug 280086 - multicast: setsockopt(...IP_DROP_MEMBERSHIP...) doesn't lead to sending IGMP packet after base r349369
Summary: multicast: setsockopt(...IP_DROP_MEMBERSHIP...) doesn't lead to sending IGMP ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.3-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-net (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-07-02 12:57 UTC by guido
Modified: 2024-09-24 07:02 UTC (History)
2 users (show)

See Also:


Attachments
mcasttest.c (1.67 KB, text/plain)
2024-07-03 21:35 UTC, Gleb Smirnoff
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description guido 2024-07-02 12:57:26 UTC
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.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2024-07-02 21:44:28 UTC
^Triage: Cc: reviewer of base r349369 .
Comment 2 Gleb Smirnoff freebsd_committer freebsd_triage 2024-07-03 21:34:13 UTC
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.
Comment 3 Gleb Smirnoff freebsd_committer freebsd_triage 2024-07-03 21:35:12 UTC
Created attachment 251852 [details]
mcasttest.c

test program
Comment 4 guido 2024-07-08 09:35:31 UTC
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)]
Comment 6 Franco Fichtner 2024-09-24 07:02:24 UTC
Nice, it took some time to get this merged to stable.  But now it's fixed for when 14.2 arrives.  :)


Cheers,
Franco