From owner-svn-src-stable-11@freebsd.org Sun Oct 2 01:16:03 2016 Return-Path: Delivered-To: svn-src-stable-11@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 B914DAC4A35; Sun, 2 Oct 2016 01:16:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9155CB88; Sun, 2 Oct 2016 01:16:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u921G2Qq005062; Sun, 2 Oct 2016 01:16:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u921G2GR005057; Sun, 2 Oct 2016 01:16:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610020116.u921G2GR005057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 2 Oct 2016 01:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306573 - stable/11/sys/netinet6 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 01:16:03 -0000 Author: markj Date: Sun Oct 2 01:16:02 2016 New Revision: 306573 URL: https://svnweb.freebsd.org/changeset/base/306573 Log: MFC r306285: Rename ndpr_refcnt to ndpr_addrcnt. Modified: stable/11/sys/netinet6/in6.c stable/11/sys/netinet6/nd6.c stable/11/sys/netinet6/nd6.h stable/11/sys/netinet6/nd6_rtr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/in6.c ============================================================================== --- stable/11/sys/netinet6/in6.c Sun Oct 2 01:14:26 2016 (r306572) +++ stable/11/sys/netinet6/in6.c Sun Oct 2 01:16:02 2016 (r306573) @@ -630,7 +630,7 @@ in6_control(struct socket *so, u_long cm /* relate the address to the prefix */ if (ia->ia6_ndpr == NULL) { ia->ia6_ndpr = pr; - pr->ndpr_refcnt++; + pr->ndpr_addrcnt++; /* * If this is the first autoconf address from the @@ -638,7 +638,7 @@ in6_control(struct socket *so, u_long cm * (when required). */ if ((ia->ia6_flags & IN6_IFF_AUTOCONF) && - V_ip6_use_tempaddr && pr->ndpr_refcnt == 1) { + V_ip6_use_tempaddr && pr->ndpr_addrcnt == 1) { int e; if ((e = in6_tmpifadd(ia, 1, 0)) != 0) { log(LOG_NOTICE, "in6_control: failed " @@ -690,11 +690,11 @@ aifaddr_out: * and the prefix management. We do this, however, to provide * as much backward compatibility as possible in terms of * the ioctl operation. - * Note that in6_purgeaddr() will decrement ndpr_refcnt. + * Note that in6_purgeaddr() will decrement ndpr_addrcnt. */ pr = ia->ia6_ndpr; in6_purgeaddr(&ia->ia_ifa); - if (pr && pr->ndpr_refcnt == 0) + if (pr && pr->ndpr_addrcnt == 0) prelist_remove(pr); EVENTHANDLER_INVOKE(ifaddr_event, ifp); break; @@ -1305,9 +1305,9 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st "in6_unlink_ifa: autoconf'ed address " "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); } else { - ia->ia6_ndpr->ndpr_refcnt--; + ia->ia6_ndpr->ndpr_addrcnt--; /* Do not delete lles within prefix if refcont != 0 */ - if (ia->ia6_ndpr->ndpr_refcnt == 0) + if (ia->ia6_ndpr->ndpr_addrcnt == 0) remove_lle = 1; ia->ia6_ndpr = NULL; } Modified: stable/11/sys/netinet6/nd6.c ============================================================================== --- stable/11/sys/netinet6/nd6.c Sun Oct 2 01:14:26 2016 (r306572) +++ stable/11/sys/netinet6/nd6.c Sun Oct 2 01:16:02 2016 (r306573) @@ -1159,7 +1159,7 @@ nd6_purge(struct ifnet *ifp) * still be above zero. We therefore reset it to * make sure that the prefix really gets purged. */ - pr->ndpr_refcnt = 0; + pr->ndpr_addrcnt = 0; prelist_remove(pr); } @@ -2674,7 +2674,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) else p.expire = maxexpire; } - p.refcnt = pr->ndpr_refcnt; + p.refcnt = pr->ndpr_addrcnt; p.flags = pr->ndpr_stateflags; p.advrtrs = 0; LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) Modified: stable/11/sys/netinet6/nd6.h ============================================================================== --- stable/11/sys/netinet6/nd6.h Sun Oct 2 01:14:26 2016 (r306572) +++ stable/11/sys/netinet6/nd6.h Sun Oct 2 01:16:02 2016 (r306573) @@ -275,7 +275,7 @@ struct nd_prefix { /* list of routers that advertise the prefix: */ LIST_HEAD(pr_rtrhead, nd_pfxrouter) ndpr_advrtrs; u_char ndpr_plen; - int ndpr_refcnt; /* reference couter from addresses */ + int ndpr_addrcnt; /* count of derived addresses */ }; #define ndpr_raf ndpr_flags Modified: stable/11/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/11/sys/netinet6/nd6_rtr.c Sun Oct 2 01:14:26 2016 (r306572) +++ stable/11/sys/netinet6/nd6_rtr.c Sun Oct 2 01:16:02 2016 (r306573) @@ -1053,7 +1053,7 @@ prelist_remove(struct nd_prefix *pr) /* what should we do? */ } - if (pr->ndpr_refcnt > 0) + if (pr->ndpr_addrcnt > 0) return; /* notice here? */ /* unlink ndpr_entry from nd_prefix list */ @@ -1356,7 +1356,7 @@ prelist_update(struct nd_prefixctl *new, /* * note that we should use pr (not new) for reference. */ - pr->ndpr_refcnt++; + pr->ndpr_addrcnt++; ia6->ia6_ndpr = pr; /* @@ -2114,7 +2114,7 @@ in6_tmpifadd(const struct in6_ifaddr *ia return (EINVAL); /* XXX */ } newia->ia6_ndpr = ia0->ia6_ndpr; - newia->ia6_ndpr->ndpr_refcnt++; + newia->ia6_ndpr->ndpr_addrcnt++; ifa_free(&newia->ia_ifa); /*