Bug 240137 - Multicast source blocking using IP_BLOCK_SOURCE not working?
Summary: Multicast source blocking using IP_BLOCK_SOURCE not working?
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
Depends on:
Reported: 2019-08-27 01:15 UTC by Greg Lewis
Modified: 2019-08-27 01:15 UTC (History)
0 users

See Also:

Test program (4.42 KB, text/plain)
2019-08-27 01:15 UTC, Greg Lewis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Lewis freebsd_committer 2019-08-27 01:15:41 UTC
Created attachment 206944 [details]
Test program

While testing Java on FreeBSD, I noticed a test failure due to multicast source blocking not working.  I can supply the Java code if that would be helpful, but I've boiled down the test into some C code which does the same thing which I think will be more useful.

The test code will attempt to first send and receive a multicast packet.  It will then block the source and try it again.  This should result in the second receive just blocking since no packet should come through.  However, on FreeBSD it does.  The same test program on Linux behaves as expected (i.e., the second receive blocks).

Please let me know if the test program is doing something incorrectly on FreeBSD.  This is based on my reading of the section of ip(4) regarding IP_BLOCK_SOURCE and testing on Linux.

Note that I've tested the code on both 11.3 and 12.0, with the same result.