Multicast problems

Bruce M. Simpson bms at
Mon Jun 18 17:50:04 UTC 2007

Ian FREISLICH wrote:
> 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 (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 ( 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:

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 ( falls under the local 
administrative scope -- 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:

Kind regards,

More information about the freebsd-current mailing list