While debugging the recent "route change" regression I found various bugs in the code handling IPv6 addresses. The most ugly one, because it leaves you with a null ifp pointer in your routing table, is fixed by the diff below.
Basically if you try to remove an address from an interface, by deleting it for example, in one rdomain and you have the same address in another rdomain you wont remove the route. You can run rttest14 and rttest16 in regress/sbin/route to see what happens. Ok? Index: netinet6/in6.c =================================================================== RCS file: /home/ncvs/src/sys/netinet6/in6.c,v retrieving revision 1.146 diff -u -p -r1.146 in6.c --- netinet6/in6.c 24 Nov 2014 12:43:54 -0000 1.146 +++ netinet6/in6.c 26 Nov 2014 14:04:54 -0000 @@ -1053,6 +1053,9 @@ in6_purgeaddr(struct ifaddr *ifa) * XXX: we should avoid such a configuration in IPv6... */ TAILQ_FOREACH(tmp, &in6_ifaddr, ia_list) { + if (tmp->ia_ifp->if_rdomain != ifp->if_rdomain) + continue; + if (IN6_ARE_ADDR_EQUAL(&tmp->ia_addr.sin6_addr, &ia6->ia_addr.sin6_addr)) { ia6_count++;