On Sun, Jun 09, 2013 at 06:34:27PM +0200, Christopher Zimmermann wrote:
> inet 172.26.153.50 0xffffff00 NONE mtu 1398
> 
> in6_unlink_ifa: interface address 0xffff800000624a00 has no prefix
> in6_unlink_ifa: interface address 0xffff800000624a00 has no prefix

The error message is triggered by ifconfig lo1 create up.  With
address instead of pointer logging and sysctl net.inet6.icmp6.nd6_debug=1
you see the source of the problem.

in6_unlink_ifa: interface address ::0001 has no prefix
in6_ifattach_loopback: failed to configure the loopback address on lo1 
(errno=17)

It is a different issue that creating lo1 tries to add a ::1 address.
But when this fails, it is correct that it has no prefix.  So don't
log an error here.

ok?

bluhm

Index: netinet6/in6.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/in6.c,v
retrieving revision 1.112
diff -u -p -r1.112 in6.c
--- netinet6/in6.c      31 May 2013 15:04:23 -0000      1.112
+++ netinet6/in6.c      9 Jun 2013 23:48:08 -0000
@@ -1238,9 +1238,10 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st
 
        /* Release the reference to the base prefix. */
        if (ia->ia6_ndpr == NULL) {
-               if (!IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia)))
+               if (!IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia)) &&
+                   !IN6_IS_ADDR_LOOPBACK(IA6_IN6(ia)))
                        log(LOG_NOTICE, "in6_unlink_ifa: interface address "
-                           "%p has no prefix\n", ia);
+                           "%s has no prefix\n", ip6_sprintf(IA6_IN6(ia)));
        } else {
                ia->ia6_flags &= ~IN6_IFF_AUTOCONF;
                if (--ia->ia6_ndpr->ndpr_refcnt == 0)

Reply via email to