tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: IPv6: what is required of lower layers?



[Lloyd Parkes]
>> [...] now I'm getting packets, but they're addressed to a multicast
>> address, ff02:3::1:ff02:2, not the address userland is sending to.
> That might just be your system trying to find its default route.

Possibly, but I wouldn't expect it to be.  I configured tun9

	inet6 fd1e:5a23:d977:3681::2:1 prefixlen 112

(the host has no other non-link-local v6 addresses) and ping6ed
fd1e:5a23:d977:3681::2:2.  (There's nobody there, because the peer
isn't set up at the moment, but the v6 stack has no way of telling
that.)  Thus, the target should be on-net and it should be doing ND
rather than rtsol.

> If that's the case, then requests to ff02:3::1:ff02:2 could well be
> the kernel trying to find all local routers.

> What does tcpdump say is inside the ND request?

If that's what it is.

Oh, this is interesting.

tcpdump says

17:52:02.019960 IP6 fd1e:5a23:d977:3681::2:1 > ff02::1:ff02:2: ICMP6, neighbor solicitation, who has fd1e:5a23:d977:3681::2:2, length 24

(repeated a handful of times).  But the destination address I'm seeing
is ff02:3::1:ff02:2.  This then leads into....

[Michael van Elst]
>> that, and now I'm getting packets, but they're addressed to a
>> multicast address, ff02:3::1:ff02:2, not the address userland is
>> sending to.
> I would guess that's an embedded scope (and must not appear on the wire).

>     sin6->sin6_addr.s6_addr16[1] = htons(zoneid & 0xffff);

> where zoneid for a link-local address like ff02:: (or an
> interface-local address) is the interface index.

Curious.  My code is printing the address prepended by tun, not the
destination address in the packet; looking at if_tun.c (which I _have_
modified), this is the address in the third argument to tun's if_output
(const struct sockaddr *dst).  What, if anything, is the v6 stack
expecting the network interface to do with this address?

> But ff02::1:ff02:2 would be a solicited-node multicast address for
> something with an anycast or unicast address of anything:XX02:0002.

That probably is where that address came from, then: the solicited-node
address for the target.

When the 4291 says that a node is required to (compute and) "join (on
the appropriate interface) the associated Solicited-Node multicast
addresses for all unicast and anycast addresses that have been
configured for the node's interfaces", is that anything that would lead
to a downcall to the relevant driver (tun, in this case), either to
send traffic or for any more host-internal purpose?  I would imagine
so, because I expect on most Ethernet interfaces this involves poking
the chip's multicast filter, though I'd have to check the
v6-over-Ethernet spec to be sure.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index