lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users]lwip and DHCP


From: Bob Brusa
Subject: Re: [lwip-users]lwip and DHCP
Date: Wed, 06 Jan 2010 12:16:45 +0100
User-agent: Opera Mail/10.10 (Win32)

Am 25.09.2009, 10:19 Uhr, schrieb Kieran Mansley <address@hidden>:

On Wed, 2009-09-23 at 14:52 +0200, Bob Brusa wrote:
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

Have you considered getting wireshark to validate the checksum?  In the
trace you provide you've got checksum validation disabled.

Kieran

Hi
Well, its a long time ago that we talked about this dhcp-problem. In the meantime, my app works fine - but still without DHCP, using a fixed IP-address. So I come back to the issue to make it work also with DHCP.

I have looked at the computation of the checksum of the DHCP-offer (because it is reported as wrong). The packet comes in (at inet_chksum_pseudo in inet_chksum.c) fractioned in 4 pbufs. The first one is ok, but as of the 2nd one, pbufs contain all zeros only - although I see from wireshark that the 2nd one includes a few nonzero bytes. Interestingly, the tot_len and len fields of all pbufs look very reasonable.
1st: 556 150
2nc: 406 184
3rd: 222 184
4th:  38  38
Hence the problem is not the chksum, but somewhere there is a loss of data. Now I am trying to find out where the true contents of the pubs gets lost. Unfortunately I also am lost: The internal working of the lwip-stack is not easy to grasp. Best thing would be if someone already has a fix for the problem. Or good advice on how to takle the issue. Thanks for help
  Robert




reply via email to

[Prev in Thread] Current Thread [Next in Thread]