summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/nd6.c
diff options
context:
space:
mode:
authorqingli <qingli@FreeBSD.org>2008-12-17 10:03:49 +0000
committerqingli <qingli@FreeBSD.org>2008-12-17 10:03:49 +0000
commitc6a0a000ca142a4c7062f6f2fc0c31b888309b18 (patch)
tree5820a671a6e7553fdca713d351b0eccfc6ac4ec1 /sys/netinet6/nd6.c
parent62ee68bb086f87555449fb796d5153418839b5cf (diff)
downloadFreeBSD-src-c6a0a000ca142a4c7062f6f2fc0c31b888309b18.zip
FreeBSD-src-c6a0a000ca142a4c7062f6f2fc0c31b888309b18.tar.gz
in6_clsroute() was applied to prefix routes causing some
of them to expire. in6_clsroute() was only applied to cloned routes that are no longer applicable after the arp-v2 commit.
Diffstat (limited to 'sys/netinet6/nd6.c')
-rw-r--r--sys/netinet6/nd6.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 8f268f3..e2ca9eb 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1713,7 +1713,6 @@ nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
{
INIT_VNET_INET6(curvnet);
struct mbuf *m = m0;
- struct rtentry *rt = rt0;
struct llentry *ln = lle;
int error = 0;
int flags = 0;
@@ -1746,9 +1745,9 @@ nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
flags = ((m != NULL) || (lle != NULL)) ? LLE_EXCLUSIVE : 0;
if (ln == NULL) {
retry:
- IF_AFDATA_LOCK(rt->rt_ifp);
+ IF_AFDATA_LOCK(ifp);
ln = lla_lookup(LLTABLE6(ifp), flags, (struct sockaddr *)dst);
- IF_AFDATA_UNLOCK(rt->rt_ifp);
+ IF_AFDATA_UNLOCK(ifp);
if ((ln == NULL) && nd6_is_addr_neighbor(dst, ifp)) {
/*
* Since nd6_is_addr_neighbor() internally calls nd6_lookup(),
@@ -1756,9 +1755,9 @@ nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
* it is tolerable, because this should be a rare case.
*/
flags = ND6_CREATE | (m ? ND6_EXCLUSIVE : 0);
- IF_AFDATA_LOCK(rt->rt_ifp);
+ IF_AFDATA_LOCK(ifp);
ln = nd6_lookup(&dst->sin6_addr, flags, ifp);
- IF_AFDATA_UNLOCK(rt->rt_ifp);
+ IF_AFDATA_UNLOCK(ifp);
}
}
if (ln == NULL) {
@@ -1767,8 +1766,8 @@ nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
char ip6buf[INET6_ADDRSTRLEN];
log(LOG_DEBUG,
"nd6_output: can't allocate llinfo for %s "
- "(ln=%p, rt=%p)\n",
- ip6_sprintf(ip6buf, &dst->sin6_addr), ln, rt);
+ "(ln=%p)\n",
+ ip6_sprintf(ip6buf, &dst->sin6_addr), ln);
senderr(EIO); /* XXX: good error? */
}
goto sendpkt; /* send anyway */
@@ -1915,9 +1914,9 @@ nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
}
if ((ifp->if_flags & IFF_LOOPBACK) != 0) {
return ((*ifp->if_output)(origifp, m, (struct sockaddr *)dst,
- rt));
+ NULL));
}
- error = (*ifp->if_output)(ifp, m, (struct sockaddr *)dst, rt);
+ error = (*ifp->if_output)(ifp, m, (struct sockaddr *)dst, NULL);
return (error);
bad:
@@ -2008,7 +2007,7 @@ nd6_need_cache(struct ifnet *ifp)
* the lle lock, drop here for now
*/
int
-nd6_storelladdr(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
+nd6_storelladdr(struct ifnet *ifp, struct mbuf *m,
struct sockaddr *dst, u_char *desten, struct llentry **lle)
{
struct llentry *ln;
OpenPOWER on IntegriCloud