Subject: Re: mbufs problem
To: None <tech-kern@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-kern
Date: 09/27/2004 10:25:23
On Mon, Sep 27, 2004 at 02:58:23PM +0000, Emmanuel Dreyfus wrote:
> Hi
> 
> More problems with NAT-T... I get thispacket:
> IP     UDP     ESP
> <---- off ---->
>        <-skip->
> <-------- len ---->
> 
> And I want to hand esp4_input() this packet:
> IP     ESP
> 
> I tried a few things, my last attempt is:
> 
> em = m_split(m, off, M_DONTWAIT)
> m_adj(m, -(len - off + skip));

This should not be m_adj(m, -skip) ?

Perhaps you should check for em == NULL, too.

(This would be easier me to read if the variables were called ip_udp_len
and udp_len instead of off and skip, respectively.)

> m_cat(m, em);
> esp4_input(m, off - skip);
> m_free(em);

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933