Re: Multicast problems [PATCH]

From: Bruce M. Simpson <bms_at_FreeBSD.org>
Date: Tue, 03 Jul 2007 18:18:50 +0100
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

Received on Tue Jul 03 2007 - 15:18:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:13 UTC