(usagi-users 03466) Re: IPv6 Multicast question - connect fails

Jeroen Massar <[email protected]>
Newsgroups gmane.linux.ipv6.usagi.users
Organization Unfix
Message-ID <[email protected]>
On Mon, 2005-08-08 at 15:58 +0200, Bas Vermeulen wrote:
> Hi,
> 
> I've got some code that does the following:
> 
> Takes an IPv6 multicast address, and opens an UDP socket with
> socket(). It then sets the SO_REUSABLE sockopt, and binds the socket to
> in6addr_any and port 5060. I then connect() to the IPv6 multicast
> address (FF35::d:d44).
> 
> This works when the default interface has a global IPv6 address, but
> fails with a site-local (FEC0::1) or link-local (FE80::1) address.
> 
> Does anyone know why, and where I can find more information on this
> behaviour? I've included my test program. Any comments are welcome.

You definitely should be using getaddrinfo() See google(eva ipv6) =
gsyc.escet.urjc.es/~eva/IPv6-web/ipv6.html for the details.

site-locals should work, then again they are deprecated and thus you
shouuld not be using them.

Link-locals not working usually means that you bound to the wrong
interface.

Peeking at the code reveals that you think that the interface index
matches the scope id. Which is a very wrong assumption.
Check Eva's site for the solution to this and a lot of related info's.

Greets,
 Jeroen
signature.asc (application/pgp-signature, 240 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Jeroen Massar / http://unfix.org/~jeroen/

iD8DBQBC+JltKaooUjM+fCMRAl+SAJ0R1NZWLt1luJr01V9d32ZCuSSrjwCfc6F/
fBfsd+w3h7zm1GtRzdruByY=
=jbr6
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.