From owner-svn-src-head@freebsd.org Mon Sep 21 10:24:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7330A06F1F; Mon, 21 Sep 2015 10:24:35 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4B5A1364; Mon, 21 Sep 2015 10:24:35 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8LAOZ0P053215; Mon, 21 Sep 2015 10:24:35 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8LAOZsJ053214; Mon, 21 Sep 2015 10:24:35 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509211024.t8LAOZsJ053214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 21 Sep 2015 10:24:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288060 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2015 10:24:35 -0000 Author: melifaro Date: Mon Sep 21 10:24:34 2015 New Revision: 288060 URL: https://svnweb.freebsd.org/changeset/base/288060 Log: Add "stale" timer back to nd6_cache_lladdr(). Setting timer was accidentally removed in r276844 due to misleading comment on its meaningless. Add it back to restore proper behaviour. Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Sep 21 09:37:49 2015 (r288059) +++ head/sys/netinet6/nd6.c Mon Sep 21 10:24:34 2015 (r288060) @@ -1729,7 +1729,6 @@ nd6_cache_lladdr(struct ifnet *ifp, stru if (lladdr != NULL) { bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); ln->la_flags |= LLE_VALID; - ln->ln_state = ND6_LLINFO_STALE; } IF_AFDATA_WLOCK(ifp); LLE_WLOCK(ln); @@ -1738,10 +1737,12 @@ nd6_cache_lladdr(struct ifnet *ifp, stru if (ln_tmp == NULL) lltable_link_entry(LLTABLE6(ifp), ln); IF_AFDATA_WUNLOCK(ifp); - if (ln_tmp == NULL) + if (ln_tmp == NULL) { /* No existing lle, mark as new entry */ is_newentry = 1; - else { + ln->ln_state = ND6_LLINFO_STALE; + nd6_llinfo_settimer_locked(ln, (long)V_nd6_gctimer * hz); + } else { lltable_free_entry(LLTABLE6(ifp), ln); ln = ln_tmp; ln_tmp = NULL; @@ -1788,6 +1789,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen); ln->la_flags |= LLE_VALID; ln->ln_state = ND6_LLINFO_STALE; + nd6_llinfo_settimer_locked(ln, (long)V_nd6_gctimer * hz); EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED);