diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-03-21 21:57:11 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-03-21 21:57:11 +0000 |
commit | d3f88817a3849b4efe3ce3034fc629bf2ece3955 (patch) | |
tree | 4642a899be9e1d26b7f1b24500af5edf685e1dca | |
parent | f3ef28f5151c65c37d8d5dae468b99adc6bc7ded (diff) |
in nd6_cache_lladdr(), set nd6_gctimer to ln_expire just after the state
transition to STALE. fixes tahi test breakage. sync with kame.
-rw-r--r-- | sys/netinet6/nd6.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index f92ad3b5a69..e6e7c92ca7f 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,5 +1,5 @@ -/* $OpenBSD: nd6.c,v 1.30 2001/03/08 09:03:06 itojun Exp $ */ -/* $KAME: nd6.c,v 1.136 2001/03/06 12:26:07 itojun Exp $ */ +/* $OpenBSD: nd6.c,v 1.31 2001/03/21 21:57:10 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. @@ -1649,8 +1649,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 @@ -1662,9 +1673,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; |