Calling m_pullup in ether_input

Luigi Rizzo rizzo at icir.org
Sat Oct 9 01:31:44 PDT 2004


On Sat, Oct 09, 2004 at 12:34:34AM +0400, Gleb Smirnoff wrote:
> On Fri, Oct 08, 2004 at 06:15:15PM +0300, Giorgos Keramidas wrote:
> G> In ether_input() we unconditionaly discard the mbufs whose m_len is less than
> G> ETHER_HDR_LEN.  A bit higher M_PKTHDR has been checked but the check made
> G> before discarding the frame doesn't pay attention to the m->m_pkthdr.len (the
> G> total packet length).
> 
> In my humble opinion, all Ethernet device drivers are intentionally written
> in such a way that they always pass an mbuf with contigous Ethernet header
> to ether_input().

actually, historically it wasn't always like this,
the API for ether_input()used to have the MAC header in a different
place, so the code giorgios refers to might be a leftover
from older times (still in 4.x)

cheers
luigi


More information about the freebsd-net mailing list