Index: netinet6/nd6.c =================================================================== RCS file: /home/ncvs/src/sys/netinet6/nd6.c,v retrieving revision 1.78 diff -u -p -r1.78 nd6.c --- netinet6/nd6.c 21 May 2007 14:38:20 -0000 1.78 +++ netinet6/nd6.c 8 Jun 2007 14:11:01 -0000 @@ -1990,9 +1990,9 @@ again: * if the gateway is our own address, which is * sometimes used to install a route to a p2p link. */ + RT_UNLOCK(rt); if (!nd6_is_addr_neighbor(gw6, ifp) || in6ifa_ifpwithaddr(ifp, &gw6->sin6_addr)) { - RT_UNLOCK(rt); /* * We allow this kind of tricky route only * when the outgoing interface is p2p. @@ -2002,7 +2002,8 @@ again: senderr(EHOSTUNREACH); goto sendpkt; - } + } else + RT_LOCK(rt); if (rt->rt_gwroute == NULL) goto lookup;