Yurong Sun
|
Network stack hang after (*ifp->if_input)(ifp, m) call
|
Yurong Sun
01/20/2012 3:54 PM
post91057
|
Network stack hang after (*ifp->if_input)(ifp, m) call
Hi,
I am trying to forward ping reply packet up to the network stack. The packet is pretty simple, IP header(14bytes) + ARP
reply (28bytes) = 42 bytes. I have verified the mbuf contents, all look fine to me. Here is what I dumped the mbuf->
m_data, the m->pkthdr.len = m->m_len = 42. This data is after I stripped off 802.11 frame header and then m_adj the
m_data pointer. The data is in the external cluster area. There is one concern for me is that the m->m_data is 0x2ca0c2
after adjustment, which is not aligned. Could this be an issue?
00 21 e8 71 70 f4 00 1b 11 4f 42 5f 08 06 00 01
08 00 06 04 00 02 00 1b 11 4f 42 5f c0 a8 00 01
00 21 e8 71 70 f4 c0 a8 00 0a
I even wrote a similar function as the ether_input(..) to make sure ifp and m can be correctly parsed. The ethtype is
correct ARP type, 0x806, from mbuf passed in.
Since I just mimic ether_input, so I don't know how network stack deal with it afterwards. In ping, I try to debug it
too, and I found for each ping request, I got the error code indicate port unreachable.
Thanks!
Yurong
|
|
|