[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Memory error on DHCP retry
From: |
rsch |
Subject: |
[lwip-users] Memory error on DHCP retry |
Date: |
Fri, 12 Apr 2019 05:39:45 -0700 (MST) |
When setting up my STM32H7 with LwIP 2.1.2, FreeRTOS 10.2.0. I try to start
my device as a DHCP client.
The first try I see a DHCP Discover packet I Wireshark. After a second the
time-out kicks in and the device will start a retry. This will result in a
hardfault error.
So far I have narrowed it down to the LWIP function: dhcp_create_msg in
dhcp.c. The values dhcp->xid and p_out->next share the same address
First try:
&(dhcp->xid) = 0x20003DB8
&(p_out->next) = 0x20003DF4
Retry:
&(dhcp->xid) = 0x20003DB8
&(p_out->next) = 0x20003DB8
When the new xid is set this will automatically set the next pointer, in the
lowlevel_output following loop contains:
for(q = p; q != NULL; q = q->next)
The p_out->next (dhcp->xid) won't be NULL and will try to read the data
causing a hardfaulterror
Is there something I am missing?
--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
- [lwip-users] Memory error on DHCP retry,
rsch <=