Re: Multicast problems

From: Bruce M. Simpson <bms_at_incunabulum.net>
Date: Mon, 18 Jun 2007 18:49:54 +0100
Ian FREISLICH wrote:
> It looks like it just uses IP_ADD_MEMBERSHIP.  HAVE_BSD_STRUCT_IP_MREQ_HACK
> is defined.  I really don't know anything about how it should be
> doing this to say whether the above code is correct.
>   
This is expected behaviour. The new code phases out the hack which this 
define refers to, which is to encode 24 bits of an interface index in 
0.0.0.0/8 (first 8 bits set to zero).

The reason why the hack was needed in the first place is because of how 
the BSD INADDR_TO_IFP() lookup works with regards to unnumbered and 
point-to-point interfaces, as described in UPDATING.

The issue with joining groups on INADDR_ANY is separate from this -- it 
is related only insofaras code which still expects to abuse the RFC 1724 
style behaviour (0.0.0.0/8) is going to end up with INADDR_TO_IFP 
returning NULL, and will hit the same path. I would expect Quagga to 
fail to add the group with EADDRNOTAVAIL.

There have been attempts to fix this in NetBSD differently, by changing 
the lookup, however, I should point out that it still doesn't fix the 
issue with unnumbered interfaces:
    http://mail-index.netbsd.org/netbsd-bugs/1999/04/02/0001.html

I didn't roll a patch for Quagga as it's not part of the base system. 
Making the required change shouldn't be difficult. It is probably easier 
for the purposes of Quagga to use the Linux-derived ip_mreqn extension 
to the IP_MULTICAST_IF ioctl for interface selection, as ospf should be 
using a locally-scoped address (224.0.0.5 falls under the local 
administrative scope 224.0.0.0/8) -- although the MCAST_JOIN_GROUP ioctl 
is the one to use if one needs to bind to an interface by index and be 
sure that it actually worked.

The patch for Rhyolite routed demonstrates both techniques. It is 
available here:
    http://people.freebsd.org/~bms/dump/routed.rfc3678.diff

Kind regards,
BMS
Received on Mon Jun 18 2007 - 15:50:04 UTC

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