Multicast problems [PATCH]

Bruce M. Simpson bms at FreeBSD.org
Tue Jul 3 17:18:52 UTC 2007


Bruce M. Simpson wrote:
>
> I see now that Linux also supports ip_mreqn in its IP_ADD_MEMBERSHIP 
> path. I could potentially change the ASM API ioctl paths 
> (IP_ADD_MEMBERSHIP, IP_DEL_MEMBERSHIP) to detect and support the 
> ip_mreqn structure -- however -- I am loathe to do this as it 
> introduces another bunch of nested conditionals, as the same code now 
> has to support IP_ADD_SOURCE_MEMBERSHIP in FreeBSD, which has the same 
> structure size. It is also a retrograde change. 

I have attached a diff which emulates the Linux ip_mreqn kludge in the 
IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP paths; this includes the 
changes from the previous patch to workaround the non-existence of a 
default route on boot.

I do not plan to commit it at the moment and have not tested it. The 
right thing for applications to do is to use the RFC 3678 API if they 
need to join an interface by index, the legacy ASM API can only be 
relied upon if interfaces are assigned IPv4 addresses, and it breaks for 
point-to-point because of legacy BSD behaviour.

regards,
BMS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_drop_mreqn.diff
Type: text/x-patch
Size: 5409 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070703/d4f903b6/add_drop_mreqn-0001.bin


More information about the freebsd-current mailing list