From owner-svn-src-head@freebsd.org Tue Sep 22 20:45:05 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 3172CA02DA3; Tue, 22 Sep 2015 20:45:05 +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 21CF11F5A; Tue, 22 Sep 2015 20:45:05 +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 t8MKj5lf033577; Tue, 22 Sep 2015 20:45:05 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8MKj4q0033575; Tue, 22 Sep 2015 20:45:04 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201509222045.t8MKj4q0033575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 22 Sep 2015 20:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288129 - 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: Tue, 22 Sep 2015 20:45:05 -0000 Author: melifaro Date: Tue Sep 22 20:45:04 2015 New Revision: 288129 URL: https://svnweb.freebsd.org/changeset/base/288129 Log: Use standard lle LLE_EXCLUSIVE request flags instead of its redefined version. Modified: head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Tue Sep 22 20:42:14 2015 (r288128) +++ head/sys/netinet6/nd6.c Tue Sep 22 20:45:04 2015 (r288129) @@ -991,7 +991,6 @@ nd6_lookup(const struct in6_addr *addr6, { struct sockaddr_in6 sin6; struct llentry *ln; - int llflags; bzero(&sin6, sizeof(sin6)); sin6.sin6_len = sizeof(struct sockaddr_in6); @@ -1000,8 +999,7 @@ nd6_lookup(const struct in6_addr *addr6, IF_AFDATA_LOCK_ASSERT(ifp); - llflags = (flags & ND6_EXCLUSIVE) ? LLE_EXCLUSIVE : 0; - ln = lla_lookup(LLTABLE6(ifp), llflags, (struct sockaddr *)&sin6); + ln = lla_lookup(LLTABLE6(ifp), flags, (struct sockaddr *)&sin6); return (ln); } @@ -1331,7 +1329,7 @@ nd6_nud_hint(struct rtentry *rt, struct ifp = rt->rt_ifp; IF_AFDATA_RLOCK(ifp); - ln = nd6_lookup(dst6, ND6_EXCLUSIVE, NULL); + ln = nd6_lookup(dst6, LLE_EXCLUSIVE, NULL); IF_AFDATA_RUNLOCK(ifp); if (ln == NULL) return; @@ -1741,13 +1739,13 @@ nd6_cache_lladdr(struct ifnet *ifp, stru * Spec says nothing in sections for RA, RS and NA. There's small * description on it in NS section (RFC 2461 7.2.3). */ - flags = lladdr ? ND6_EXCLUSIVE : 0; + flags = lladdr ? LLE_EXCLUSIVE : 0; IF_AFDATA_RLOCK(ifp); ln = nd6_lookup(from, flags, ifp); IF_AFDATA_RUNLOCK(ifp); is_newentry = 0; if (ln == NULL) { - flags |= ND6_EXCLUSIVE; + flags |= LLE_EXCLUSIVE; ln = nd6_alloc(from, 0, ifp); if (ln == NULL) return; @@ -1763,7 +1761,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru IF_AFDATA_WLOCK(ifp); LLE_WLOCK(ln); /* Prefer any existing lle over newly-created one */ - ln_tmp = nd6_lookup(from, ND6_EXCLUSIVE, ifp); + ln_tmp = nd6_lookup(from, LLE_EXCLUSIVE, ifp); if (ln_tmp == NULL) lltable_link_entry(LLTABLE6(ifp), ln); IF_AFDATA_WUNLOCK(ifp); @@ -1779,7 +1777,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru } /* do nothing if static ndp is set */ if ((ln->la_flags & LLE_STATIC)) { - if (flags & ND6_EXCLUSIVE) + if (flags & LLE_EXCLUSIVE) LLE_WUNLOCK(ln); else LLE_RUNLOCK(ln); @@ -1836,7 +1834,7 @@ nd6_cache_lladdr(struct ifnet *ifp, stru if ((type & 0xFF) == ND_REDIRECT && code != ND_REDIRECT_ROUTER) ln->la_flags |= LLE_REDIRECT; - if (flags & ND6_EXCLUSIVE) + if (flags & LLE_EXCLUSIVE) LLE_WUNLOCK(ln); else LLE_RUNLOCK(ln); @@ -2053,7 +2051,7 @@ nd6_resolve(struct ifnet *ifp, int is_gw * * Heavy version. * Function assume that destination LLE does not exist, - * is invalid or stale, so ND6_EXCLUSIVE lock needs to be acquired. + * is invalid or stale, so LLE_EXCLUSIVE lock needs to be acquired. */ static int nd6_resolve_slow(struct ifnet *ifp, struct mbuf *m, @@ -2071,7 +2069,7 @@ nd6_resolve_slow(struct ifnet *ifp, stru */ if (lle == NULL) { IF_AFDATA_RLOCK(ifp); - lle = nd6_lookup(&dst->sin6_addr, ND6_EXCLUSIVE, ifp); + lle = nd6_lookup(&dst->sin6_addr, LLE_EXCLUSIVE, ifp); IF_AFDATA_RUNLOCK(ifp); if ((lle == NULL) && nd6_is_addr_neighbor(dst, ifp)) { /* @@ -2093,7 +2091,7 @@ nd6_resolve_slow(struct ifnet *ifp, stru IF_AFDATA_WLOCK(ifp); LLE_WLOCK(lle); /* Prefer any existing entry over newly-created one */ - lle_tmp = nd6_lookup(&dst->sin6_addr, ND6_EXCLUSIVE, ifp); + lle_tmp = nd6_lookup(&dst->sin6_addr, LLE_EXCLUSIVE, ifp); if (lle_tmp == NULL) lltable_link_entry(LLTABLE6(ifp), lle); IF_AFDATA_WUNLOCK(ifp); Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Tue Sep 22 20:42:14 2015 (r288128) +++ head/sys/netinet6/nd6.h Tue Sep 22 20:45:04 2015 (r288129) @@ -89,8 +89,6 @@ struct nd_ifinfo { #define ND6_IFF_NO_PREFER_IFACE 0x80 /* XXX: not related to ND. */ #define ND6_IFF_NO_DAD 0x100 -#define ND6_EXCLUSIVE LLE_EXCLUSIVE - #ifdef _KERNEL #define ND_IFINFO(ifp) \ (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->nd_ifinfo)