OK, I have already explanation of my strange problems with the DHCP renew. The problem was, unfortunately, in my code ☹. The stack stores a chained pcbs for all UDP connections. DHCP creates such connection when it is started. But because of my mistake, I brake the chain and I'm losing connection with the pcb, created from the DHCP (the first one that was created after power on). Therefore by renew the stack doesn't find a pcb for port 68. After a small fix in my code all works just fine and it is so simple as it should be.
Simeon > -----Original Message----- > From: lwip-users <lwip-users-bounces+simeon.trifonov=amk- > [email protected]> On Behalf Of [email protected] > Sent: Friday, March 30, 2018 4:10 PM > To: Mailing list for lwIP users <[email protected]> > Subject: Re: [lwip-users] FW: Problem with renewing DHCP after link > down/up with the new LWIP V2.0.2 > > On 30.03.2018 13:01, <mailto:[email protected]> > [email protected] wrote: > > I replaced the function dhcp_renew() with dhcp_network_changed(). > > After power on, the dhcp works fine again (the complete log is > > attached). The first strange thing for me is the ARPs that follow. The > > devices askes who has IP address 192.168.5.60, but it is his new address... > > Is > that normal? > > Yes. The client checks if the address assigned by the server is really unused. > This is sometimes called "address collision detection" (ACD) and is e.g. > required for Ethernet-IP at least... Just yesterday I had a DHCP server > assigning a duplicate address, where this helps :-) > > > The other strange thing is that if I disconnect the Ethernet cable and > > connect it again (in the same network), all things that follow (after > > line > > 12) are not understandable for me. > > The IP checksum of the DHCP ACKs are 0, but that might be checksum > offloading because you monitor on the host that is running the DHCP server? > If not, it's correct that lwIP does not get them. > > > I seems that my device doesn't receive the frames from the DHCP > > server. > > Hmm, looking again, it seems that lwIP just does not receive the answers as > valid DHCP packets, as it sends an ICMP "port unreachable" as response. > That's strange... I don't think that's a problem with your tunneling thing... > > Simon > > _______________________________________________ > lwip-users mailing list > <mailto:[email protected]> [email protected] > <https://lists.nongnu.org/mailman/listinfo/lwip-users> > https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
