Move the oversize ethernet frame size check into DIAGNOSTIC,

as was proposed when it was originally added.  This allows
LRO to work on non-DIAGNOSTIC kernels without consuming
any mbuf flags.

Discussed with: sam
This commit is contained in:
Andrew Gallatin 2007-06-11 18:45:49 +00:00
parent 3213dc8412
commit 2144e288fa

View File

@ -542,6 +542,7 @@ ether_input(struct ifnet *ifp, struct mbuf *m)
}
eh = mtod(m, struct ether_header *);
etype = ntohs(eh->ether_type);
#ifdef DIAGNOSTIC
if (m->m_pkthdr.len >
ETHER_MAX_FRAME(ifp, etype, m->m_flags & M_HASFCS)) {
if_printf(ifp, "discard oversize frame "
@ -553,6 +554,7 @@ ether_input(struct ifnet *ifp, struct mbuf *m)
m_freem(m);
return;
}
#endif
if (m->m_pkthdr.rcvif == NULL) {
if_printf(ifp, "discard frame w/o interface pointer\n");
ifp->if_ierrors++;