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
Attachment:
signature.asc
Description: This is a digitally signed message part