Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jun 2007 19:05:06 +0100
From:      "Bruce M. Simpson" <bms@incunabulum.net>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        Ian FREISLICH <ianf@clue.co.za>, current@freebsd.org
Subject:   Re: Multicast problems
Message-ID:  <4676C952.5000607@incunabulum.net>
In-Reply-To: <Pine.GSO.4.64.0706181344060.24865@sea.ntplx.net>
References:  <E1I0E3b-0000kk-Ky@clue.co.za> <46765CB9.9020105@incunabulum.net> <Pine.GSO.4.64.0706180833080.23884@sea.ntplx.net> <4676C30E.7040300@incunabulum.net> <Pine.GSO.4.64.0706181344060.24865@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Eischen wrote:
>
> I think in that case, the first non-loopback interface with IFF_MULTICAST
> should be chosen.  I think the loopback interface should be chosen in the
> absence of any other interface with IFF_MULTICAST set.  Our code does 
> rely
> on this as well.
>

That seems correct. The code to do this would belong in the conditional 
for INADDR_ANY in both the ASM and SSM join paths, if the route lookup 
fails. If we get a bad interface address from userland we still need to 
return an error as code should not be relying on the presence of the RFC 
1724 hack.

I see that the pre-4.x rc scripts added a 224/4 route before this code 
was introduced. The new multicast API shouldn't try to second-guess 
userland code in this way as it allows an interface index to be 
specified explicitly.

The nature of IGMP is such that it requires application joins to bind to 
an IPv4 interface. There are tweaks in IGMPv2 to workaround the possible 
lack of a protocol address e.g. during system bringup, however binding 
to an interface is still necessary.

IPv6 (MLDv1 and MLDv2) utterly side-steps this issue by making it 
mandatory for interfaces to have a protocol address, even if that is a 
link-local address, for multicast joins to work.

The condition we've seen is a side-effect of ip_multicast_if() being 
removed. Support for scoped addresses in the IPv4 stack will mean this 
code has to change again.

BMS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4676C952.5000607>