[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] IP packets getting dropped
From: |
Robert Schilling |
Subject: |
[lwip-users] IP packets getting dropped |
Date: |
Thu, 22 Apr 2010 11:14:08 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 |
Hi Guys,
I'm trying to port lwIP 1.3.2 to a NXP LPC1768. I'm using CoOS
(www.coocox.com) as my rtos.
ARP is working fine. If I ping my device I get an ARP respond. But ICMP
requests don't get a reply.
I found out that all IP packets getting dropped.
if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len)) {
if (iphdr_hlen > p->len)
LWIP_DEBUGF(IP_DEBUG | 2, ("IP header (len %"U16_F") does not fit
in first pbuf (len %"U16_F"), IP packet dropped.\n",
iphdr_hlen, p->len));
if (iphdr_len > p->tot_len)
LWIP_DEBUGF(IP_DEBUG | 2, ("IP (len %"U16_F") is longer than pbuf
(len %"U16_F"), "
"IP packet dropped.\n",
iphdr_len, p->tot_len));
/* free (drop) packet pbufs */
pbuf_free(p);
IP_STATS_INC(ip.lenerr);
IP_STATS_INC(ip.drop);
snmp_inc_ipindiscards();
printf("Buffer Error\n");
return ERR_OK;
}
This code snippet is out of ip.c at line 250. The if condition
(iphdr_len > p->tot_len) is true and so the packet gets dropped.
The IP packet is corect. Checked with Wireshark. The IP-Header length is
20 byte and IP-data is 40 byte
(correct for ICMP-Pig Request). But p->tot_len is always 58 or 59 in
order to be greater than 60 byte (whole IP packet).
I hope someone could help me.
Thanks in advance!
Best regards from Austria
Robert
- [lwip-users] IP packets getting dropped,
Robert Schilling <=