Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Oct 2004 01:31:44 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        Gleb Smirnoff <glebius@freebsd.org>, Giorgos Keramidas <keramida@freebsd.org>, freebsd-net@freebsd.org
Subject:   Re: Calling m_pullup in ether_input
Message-ID:  <20041009013144.A73912@xorpc.icir.org>
In-Reply-To: <20041008203434.GA2770@cell.sick.ru>; from glebius@freebsd.org on Sat, Oct 09, 2004 at 12:34:34AM %2B0400
References:  <20041008151515.GA3136@orion.daedalusnetworks.priv> <20041008203434.GA2770@cell.sick.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041009013144.A73912>