Subject: ntpd and detached ipv6 addresses
To: None <tech-net@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: tech-net
Date: 03/17/2004 08:14:19
On month-old current/i386, I start up ntpd after resuming and bringing
interfaces up.  Typically there is an old autoconfigured v6 address
and I run rtsol on the new link.   I then start up ntpd (often with a
new config file with local servers).  I have been seeing messages:

Mar 17 07:16:24 poblano ntpd[7463]: bind() fd 7, family 24, port 123, addr 3ffe:808:0:X:ZZZZ, in6_is_addr_multicast=0 flags=0 fails: Can't assign requested address

where ZZZZ is a 64-bit autoconfigured suffix, and X is the link that I
am _not_ on.  The ethernet interface has an address Y:ZZZZ, and ntpd
is listening on that one.  As soon as I can, I typed 'ifconfig fxp0',
and saw that the X address was marked detached.

So, I suspect that ntpd in lib/isc/ifiter_sysctl should decline to
bind to AF_INET6 addresses which are tenatative, duplicated, or
detached.  These are in fact the addresses that may not be bound to in
sys/netinet6/in6_pcb.c, near line 280 in in6_pcbbind.