Bug 240137

Summary: Multicast source blocking using IP_BLOCK_SOURCE not working?
Product: Base System Reporter: Greg Lewis <glewis>
Component: kernAssignee: freebsd-net mailing list <net>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: 12.0-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Test program none

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.