Hi
Further to my problem report "problem with recent port of lwip" I have found the that most probably there is something wrong with the checksum calculation of the incoming DHCPoffer. From the debug-output I see that lwip combines several fragments and then comes up with a checksum error. It drops the packet and DHCP remains without success.

I attach the "erroneous" packet as seen by wireshark (txt-mode) 090923_xx_1.out and an excerpt of the debug output of the lwip-stack 090922_3.txt. As the name might make you think - the packages are not of the same session. But the picture does not change. Can somebody guide me how to fix this problem? Just a few words where this calculation in the code is done. Thanks and best regards.
  Robert

Attachment: 090923_xx_1.out
Description: Binary data

...cut...
pbuf_header: old 0x00209f28 new 0x00209f36 (-14)
ip_input: iphdr->dest 0xa00a8c0 netif->ip_addr 0x0 (0x0, 0x0, 0xa00a8c0)
ip_input: UDP packet to DHCP client port 68
ip_input: DHCP packet accepted.
ip_input: 
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |       576     | (v, hl, tos, len)
+-------------------------------+
|    53306      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |   17  |    0x6816     | (ttl, proto, chksum)
+-------------------------------+
|  192  |  168  |    0  |    1  | (src)
+-------------------------------+
|  192  |  168  |    0  |   10  | (dest)
+-------------------------------+
ip_input: p->len 170 p->tot_len 576
pbuf_header: old 0x00209f36 new 0x00209f4a (-20)
udp_input: received datagram of length 556
UDP header:
+-------------------------------+
|        67     |        68     | (src port, dest port)
+-------------------------------+
|       556     |     0xf9a0    | (len, chksum)
+-------------------------------+
udp (192.168.0.10, 68) <-- (192.168.0.1, 67)
udp_input: calculating checksum
inet_chksum_pseudo(): checksumming pbuf 0x00209f18 (has next 0x00209e04) 
inet_chksum_pseudo(): checksumming pbuf 0x00209e04 (has next 0x00209cf0) 
inet_chksum_pseudo(): checksumming pbuf 0x00209cf0 (has next 0x00209bdc) 
inet_chksum_pseudo(): checksumming pbuf 0x00209bdc (has next 0x00000000) 
inet_chksum_pseudo(): pbuf chain lwip_chksum()=82b8
udp_input: UDP datagram discarded due to failing checksum
pbuf_free(0x00209f18)
pbuf_free: deallocating 0x00209f18
pbuf_free: deallocating 0x00209e04
pbuf_free: deallocating 0x00209cf0
pbuf_free: deallocating 0x00209bdc
INFO:<Initializing server>
tcpip_thread: API message 0x0020375c
tcpip_thread: API message 0x00203760
...cut..

_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to