From 3e898c9239c1e094340723bcb1506c239b75c91d Mon Sep 17 00:00:00 2001 From: itojun Date: Wed, 21 Mar 2001 21:56:29 +0000 Subject: [PATCH] in nd6_cache_lladdr(), set nd6_gctimer to ln_expire just after the state transition to STALE. fixes tahi test breakage. sync with kame. --- sys/netinet6/nd6.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index cb78cd7878ef..94e4c40970ac 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,5 +1,5 @@ -/* $NetBSD: nd6.c,v 1.43 2001/03/08 10:49:32 itojun Exp $ */ -/* $KAME: nd6.c,v 1.136 2001/03/06 12:26:07 itojun Exp $ */ +/* $NetBSD: nd6.c,v 1.44 2001/03/21 21:56:29 itojun Exp $ */ +/* $KAME: nd6.c,v 1.137 2001/03/21 21:52:06 jinmei Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -1655,8 +1655,19 @@ fail: ln->ln_state = newstate; if (ln->ln_state == ND6_LLINFO_STALE) { + /* + * XXX: since nd6_output() below will cause + * state tansition to DELAY and reset the timer, + * we must set the timer now, although it is actually + * meaningless. + */ + ln->ln_expire = time_second + nd6_gctimer; + if (ln->ln_hold) { #ifdef OLDIP6OUTPUT + ln->ln_asked = 0; + ln->ln_state = ND6_LLINFO_DELAY; + ln->ln_expire = time_second + nd6_delay; (*ifp->if_output)(ifp, ln->ln_hold, rt_key(rt), rt); #else @@ -1668,9 +1679,8 @@ fail: (struct sockaddr_in6 *)rt_key(rt), rt); #endif - ln->ln_hold = 0; + ln->ln_hold = NULL; } - ln->ln_expire = time_second + nd6_gctimer; } else if (ln->ln_state == ND6_LLINFO_INCOMPLETE) { /* probe right away */ ln->ln_expire = time_second;