mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Remove the m_defrag call from if_loop; testing with m_fragment
has shown that the IPv6 stack can clearly handle fragmented mbuf chains without a problem. MFC after: 1 week
This commit is contained in:
parent
0f9bd73b71
commit
20880eabe9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122498
@ -191,10 +191,6 @@ looutput(ifp, m, dst, rt)
|
|||||||
struct sockaddr *dst;
|
struct sockaddr *dst;
|
||||||
register struct rtentry *rt;
|
register struct rtentry *rt;
|
||||||
{
|
{
|
||||||
#ifdef INET6
|
|
||||||
struct mbuf *n;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
M_ASSERTPKTHDR(m); /* check if we have the packet header */
|
M_ASSERTPKTHDR(m); /* check if we have the packet header */
|
||||||
|
|
||||||
if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) {
|
if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) {
|
||||||
@ -202,29 +198,6 @@ looutput(ifp, m, dst, rt)
|
|||||||
return (rt->rt_flags & RTF_BLACKHOLE ? 0 :
|
return (rt->rt_flags & RTF_BLACKHOLE ? 0 :
|
||||||
rt->rt_flags & RTF_HOST ? EHOSTUNREACH : ENETUNREACH);
|
rt->rt_flags & RTF_HOST ? EHOSTUNREACH : ENETUNREACH);
|
||||||
}
|
}
|
||||||
#ifdef INET6
|
|
||||||
/*
|
|
||||||
* KAME requires that the packet to be contiguous on the
|
|
||||||
* mbuf. We need to make that sure.
|
|
||||||
* this kind of code should be avoided.
|
|
||||||
*
|
|
||||||
* XXX: KAME may no longer need contiguous packets. Once
|
|
||||||
* that has been verified, the following code _should_ be
|
|
||||||
* removed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (m && m->m_next != NULL) {
|
|
||||||
|
|
||||||
n = m_defrag(m, M_DONTWAIT);
|
|
||||||
|
|
||||||
if (n == NULL) {
|
|
||||||
m_freem(m);
|
|
||||||
return (ENOBUFS);
|
|
||||||
} else {
|
|
||||||
m = n;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ifp->if_opackets++;
|
ifp->if_opackets++;
|
||||||
ifp->if_obytes += m->m_pkthdr.len;
|
ifp->if_obytes += m->m_pkthdr.len;
|
||||||
|
Loading…
Reference in New Issue
Block a user