Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 May 2009 11:40:12 -0700
From:      Bob Van Zant <bob@veznat.com>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   IPv6 duplicate address detection
Message-ID:  <C625D61C.224AD%bob@veznat.com>

next in thread | raw e-mail | index | archive | help
I'm working on a piece of software that, among other things, allows an
administrator to easily configure IPv6 interfaces on a FreeBSD host. I've
run into a problem where whenever I reconfigure an interface with an IPv6
address FreeBSD marks the new address as being a duplicate.

The problem is that I'm following RFC 2461 [1] in that I send an unsolicited
neighbor advertisement to ff02::1 immediately after configuring the
interface.

This unsolicited neighbor advertisement is interpreted by FreeBSD as being a
response to the neighbor solicitation it sends around the same time as part
of duplicate address detection (DAD). This leads FreeBSD to think that the
address is already in use, it doesn't notice that it is the one already
using it.

I want this to mean that there's a bug in the IPv6 implementation in that it
shouldn't trigger a DAD failure if it sees an unsolicited NA from itself
when sent from the same physical interface.

An alternative view on this is that I shouldn't be sending out any packets,
especially unsolicited NAs, using or referencing a tentative address.

I'm writing to freebsd-net to ask what others think.

If people agree that the address shouldn't be marked as a duplicate then I
have a python script that reproduces the problem and a patch to nd6_nbr.c to
attach to a problem report that I'll file.

-Bob


[1] RFC 2461 section 7.2.6 paragraph 1:

   In some cases a node may be able to determine that its link-layer
   address has changed (e.g., hot-swap of an interface card) and may
   wish to inform its neighbors of the new link-layer address quickly.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C625D61C.224AD%bob>