summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6.c41
-rw-r--r--sys/netinet6/nd6.h1
-rw-r--r--sys/netinet6/nd6_nbr.c10
3 files changed, 4 insertions, 48 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index b842319..4098ffb 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1314,47 +1314,6 @@ nd6_free_redirect(const struct llentry *ln)
}
/*
- * Upper-layer reachability hint for Neighbor Unreachability Detection.
- *
- * XXX cost-effective methods?
- */
-void
-nd6_nud_hint(struct rtentry *rt, struct in6_addr *dst6, int force)
-{
- struct llentry *ln;
- struct ifnet *ifp;
-
- if ((dst6 == NULL) || (rt == NULL))
- return;
-
- ifp = rt->rt_ifp;
- IF_AFDATA_RLOCK(ifp);
- ln = nd6_lookup(dst6, LLE_EXCLUSIVE, NULL);
- IF_AFDATA_RUNLOCK(ifp);
- if (ln == NULL)
- return;
-
- if (ln->ln_state < ND6_LLINFO_REACHABLE)
- goto done;
-
- /*
- * if we get upper-layer reachability confirmation many times,
- * it is possible we have false information.
- */
- if (!force) {
- ln->ln_byhint++;
- if (ln->ln_byhint > V_nd6_maxnudhint) {
- goto done;
- }
- }
-
- nd6_llinfo_setstate(ln, ND6_LLINFO_REACHABLE);
-done:
- LLE_WUNLOCK(ln);
-}
-
-
-/*
* Rejuvenate this function for routing operations related
* processing.
*/
diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h
index 304b8fa..c5f0eea 100644
--- a/sys/netinet6/nd6.h
+++ b/sys/netinet6/nd6.h
@@ -412,7 +412,6 @@ void nd6_llinfo_settimer(struct llentry *, long);
void nd6_llinfo_settimer_locked(struct llentry *, long);
void nd6_timer(void *);
void nd6_purge(struct ifnet *);
-void nd6_nud_hint(struct rtentry *, struct in6_addr *, int);
int nd6_resolve(struct ifnet *, int, struct mbuf *,
const struct sockaddr *, u_char *, uint32_t *);
int nd6_ioctl(u_long, caddr_t, struct ifnet *);
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 1bcd531..7c3c87c 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -768,10 +768,9 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len)
bcopy(lladdr, &ln->ll_addr, ifp->if_addrlen);
ln->la_flags |= LLE_VALID;
EVENTHANDLER_INVOKE(lle_event, ln, LLENTRY_RESOLVED);
- if (is_solicited) {
+ if (is_solicited)
nd6_llinfo_setstate(ln, ND6_LLINFO_REACHABLE);
- ln->ln_byhint = 0;
- } else
+ else
nd6_llinfo_setstate(ln, ND6_LLINFO_STALE);
if ((ln->ln_router = is_router) != 0) {
/*
@@ -844,10 +843,9 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len)
* If not solicited and the link-layer address was
* changed, make it STALE.
*/
- if (is_solicited) {
- ln->ln_byhint = 0;
+ if (is_solicited)
nd6_llinfo_setstate(ln, ND6_LLINFO_REACHABLE);
- } else {
+ else {
if (lladdr != NULL && llchange)
nd6_llinfo_setstate(ln, ND6_LLINFO_STALE);
}
OpenPOWER on IntegriCloud