Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Feb 2012 07:03:11 +0900
From:      rozhuk.im@gmail.com
To:        "'Julian Elischer'" <julian@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   RE: m_pullup - fail
Message-ID:  <4f2b0826.10cbcc0a.5660.ffff8aa9@mx.google.com>
In-Reply-To: <4F2A2C1F.1060609@freebsd.org>
References:  <4f298d95.82b7cc0a.49b2.5d24@mx.google.com> <4F2A2C1F.1060609@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

I am writing a netgraph node for processing UDP packets passing through the
router / bridge.
Node must fully inspect the entire contents of the package, in some cases,
change them.
Node is connected to ng_ether (lower, upper).
I was faced with the fact that all packets are processed normally, except
for packets generated by the router / bridge that is larger than MHLEN.

Packet from the network:
mbuf: 0xfffffe00a9e27a00 len: 899, next: 0, 3 <pkthdr,ext>

About the same package generated a router:
mbuf: 0xfffffe00a4d59900 len: 42, next: 0xfffffe010a5c4000, 2 <pkthdr>
mbuf: 0xfffffe010a5c4000 len: 857, next: 0, 1 <ext>

In this case m_pullup (m, m-> m_pkthdr.len) - returns NULL, though he could
move 42 bytes to an external storage (ext) and remove the second mbuf
(m_next).



> -----Original Message-----
> From: Julian Elischer [mailto:julian@freebsd.org]
> Sent: Thursday, February 02, 2012 3:25 PM
> To: Rozhuk.IM@gmail.com
> Cc: freebsd-net@freebsd.org
> Subject: Re: m_pullup - fail
> 
> On 2/1/12 11:07 AM, rozhuk.im@gmail.com wrote:
> > Hello!
> >
> >
> > The function always returns an error and remove the chain MBUF for
> two
> > or more generated on the same host.
> > If the pre-call m_defrag no error occurs.
> > This is normal behavior?
> > How to know in advance the maximum size for MBUF that does not cause
> a
> > failure in m_pullup?
> >
> 
> send the list more information..
> like where it is being called from, or a stack trace, or what are you
> trying to do?
> 
> > mbuf: 0xfffffe0074fc0600 len: 42, next: 0xfffffe0073a45800, 2<pkthdr>
> > mbuf: 0xfffffe0073a45800 len: 210, next: 0, 1<ext>
> > FAIL: m_pullup: m_pkthdr.len = 252, m_len = 42, pullup_len = 252
> >
> >
> >
> > _______________________________________________
> > freebsd-net@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-net
> > To unsubscribe, send any mail to "freebsd-net-
> unsubscribe@freebsd.org"
> >




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4f2b0826.10cbcc0a.5660.ffff8aa9>