Bring back the ability of passing cached route via nd6_output_ifp().

This commit is contained in:
Alexander V. Chernikov 2015-11-15 16:02:22 +00:00
parent c1c9ab6707
commit 637670e77e
5 changed files with 8 additions and 8 deletions

View File

@ -571,7 +571,7 @@ pass:
goto bad;
}
error = nd6_output_ifp(rt->rt_ifp, origifp, m, dst);
error = nd6_output_ifp(rt->rt_ifp, origifp, m, dst, NULL);
if (error) {
in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard);
IP6STAT_INC(ip6s_cantforward);

View File

@ -935,7 +935,7 @@ passout:
m->m_pkthdr.len);
ifa_free(&ia6->ia_ifa);
}
error = nd6_output_ifp(ifp, origifp, m, dst);
error = nd6_output_ifp(ifp, origifp, m, dst, NULL);
goto done;
}
@ -1034,7 +1034,7 @@ sendorfree:
counter_u64_add(ia->ia_ifa.ifa_obytes,
m->m_pkthdr.len);
}
error = nd6_output_ifp(ifp, origifp, m, dst);
error = nd6_output_ifp(ifp, origifp, m, dst, NULL);
} else
m_freem(m);
}

View File

@ -1905,7 +1905,7 @@ nd6_grab_holdchain(struct llentry *ln, struct mbuf **chain,
int
nd6_output_ifp(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m,
struct sockaddr_in6 *dst)
struct sockaddr_in6 *dst, struct route *ro)
{
int error;
int ip6len;
@ -1944,7 +1944,7 @@ nd6_output_ifp(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m,
if ((ifp->if_flags & IFF_LOOPBACK) == 0)
origifp = ifp;
error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, NULL);
error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, ro);
return (error);
}
@ -2192,7 +2192,7 @@ nd6_flush_holdchain(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *chain
while (m_head) {
m = m_head;
m_head = m_head->m_nextpkt;
error = nd6_output_ifp(ifp, origifp, m, dst);
error = nd6_output_ifp(ifp, origifp, m, dst, NULL);
}
/*

View File

@ -422,7 +422,7 @@ int nd6_flush_holdchain(struct ifnet *, struct ifnet *, struct mbuf *,
int nd6_add_ifa_lle(struct in6_ifaddr *);
void nd6_rem_ifa_lle(struct in6_ifaddr *, int);
int nd6_output_ifp(struct ifnet *, struct ifnet *, struct mbuf *,
struct sockaddr_in6 *);
struct sockaddr_in6 *, struct route *);
/* nd6_nbr.c */
void nd6_na_input(struct mbuf *, int, int);

View File

@ -5588,7 +5588,7 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
if (IN6_IS_SCOPE_EMBED(&dst.sin6_addr))
dst.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
if ((u_long)m0->m_pkthdr.len <= ifp->if_mtu)
nd6_output_ifp(ifp, ifp, m0, &dst);
nd6_output_ifp(ifp, ifp, m0, &dst, NULL);
else {
in6_ifstat_inc(ifp, ifs6_in_toobig);
if (r->rt != PF_DUPTO)