From 2144e288fa8775b135f20c3809cb648a25518e2a Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Mon, 11 Jun 2007 18:45:49 +0000 Subject: [PATCH] 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 --- sys/net/if_ethersubr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 1fabaca614dc..8615e8655468 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -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++;