Subject: mbufs problem
To: None <tech-kern@netbsd.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: tech-kern
Date: 09/27/2004 14:58:23
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));
m_cat(m, em);
esp4_input(m, off - skip);
m_free(em);


It screws up everything. Anyone has a suggestion? Something simplier?
All the similar situations I've found in kernel code are much more 
easier since they deal with just stripping the beginning of the packet, not 
a part of it.

-- 
Emmanuel Dreyfus
manu@netbsd.org