[Xorp-hackers] FreeBSD: IP_ADD_MEMBERSHIP on IFF_POINTOPOINT problems

Bruce M Simpson bms@spc.org
Wed, 16 Jun 2004 05:49:02 +0100


Has multicast group membership been an issue with FreeBSD and
point-to-point interfaces in any of your testing?
I'm trawling through the FreeBSD PRs which I currently own.

RIP in particular appears to be something which suffers from this,
according to this problem report:
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/51927

The Rhyolite.com routed source tries to work around the problem
in various ways; if MCAST_PPP_BUG is defined when compiled, it
simply doesn't enable multicast for RIPv2 on IFF_POINTOPOINT
interfaces.

As this applies to XORP: looking at comm_sock_join4() in
libcomm/comm_sock.c, no such assumptions are made, it is a simple
helper for IP_ADD_MEMBERSHIP, so I imagine this issue may bite.

The patch proposed in the PR tries to match on the remote address
of a PTP interface if the original ifp lookup fails. This would
certainly be the case for an unnumbered interface.

NetBSD, on the other hand, allows multicast group memberships to
be added by interface index:
http://mail-index.netbsd.org/tech-net/2003/10/24/0005.html

Further research reveals that this is mandated by RFC 1724 section
3.3 (RIP Version 2 MIB Extension) which mandates the special casing
of ip_multicast_if() within the BSD stack where 0.0.0.0/8 is concerned.

[After discussion with FreeBSD network junta, I'll commit something for
this soon.]

Regards,
BMS