views:

471

answers:

2

Hi all,

This is a slightly obscure question, but I'm stumped and I thought maybe somebody out there might have more of a clue on the issue.

My co-worker has been successfully running an in-house application that uses IPv6 multicasting on his MacBook Pro for several months, but today the Mac decided to stop routing the multicast packets. In particular, the program prints this error:

SendDataUDP(ff02::bead:cede:deed:feed@4) failed on Network interface [Name=[en0] Description=[] IP=[fe80::222:41ff:fe21:dfd4@4] Netmask=[ffff:ffff:ffff:ffff::] Broadcast=[::]] (errno=65/No route to host).

... which pretty well describes what went wrong... it tried to sendto() a UDP packet to the IP address shown, and send() failed with errno=EHOSTUNREACH.

What I don't understand is, what could possibly cause an IPv6 link-scope multicast address to be "unreachable"? If my understanding of link-scope multicast is correct, the packet only has to go out the local ethernet port (en0 in this case, which is up and working on that machine).

Is there some aspect to multicasting that I'm missing, or is his machine just borked? He says he didn't change anything, it just mysteriously stopped working.

+1  A: 

To test whether en0 is still capable of transmitting link-local multicast requests, try

ping6 ff02::1%en0

This contacts all hosts, so you should get plenty of responses (for fun, try adding -w).

Martin v. Löwis
funny, that didn't work, I had to use the '-I' option to specify ethernet address to ping6.jdks-mbp:~ jeffk$ ping6 ff02::1%en0ping6: UDP connect: No route to hostjdks-mbp:~ jeffk$ ping6 -I en0 ff02::1PING6(56=40+8+8 bytes) fe80::21f:f3ff:fed8:3680%en0 --> ff02::116 bytes from fe80::21f:f3ff:fed8:3680%en0, icmp_seq=0 hlim=64 time=0.131 ms
jdkoftinoff
A: 

It might help to look at the kernel source. (In particular, the egress IPv6 packet egress path, ip6_output.c) While you're in there, you could also take a look at the socket calls leading up to it, etc.

For multicast, assuming you're making it to ip6_output(), it looks like the only possible way to get this error is by not specifying the interface to send on. (which is odd since your error message explicitly mentions the interface)

Is it possible that the wireless interface on this MacBook has been enabled when it wasn't before, and now the idea of a "link-local" multicast is ambiguous? Are you explicitly specifying the interface when you use the socket? The @4 at the end of the address looks odd to me. (Is that an interface index?) The convention is usually to use % for an interface scope-id, but as noted in the previous answer and its comments, it's not universally supported.

Mike
Jeremy Friesner