Skip to content

Commit

Permalink
Merge branch 'fix/lwip_dhcp_timeout_u32' into 'master'
Browse files Browse the repository at this point in the history
fix(lwip): Fix DHCP lease overlow using u32 type

Closes WIFIBUG-908

See merge request espressif/esp-idf!35280
  • Loading branch information
David Čermák committed Nov 29, 2024
2 parents 308bad9 + 6fe443a commit 1c13798
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/lwip/port/include/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ extern "C" {
*/
#define DHCP_REQUEST_BACKOFF_SEQUENCE(state, tries) ((uint16_t)(((tries) < 5 ? 1 << (tries) : 16) * 250))

/* Use custom DHCP timeout type to support longer lease times (with IDF coarse timer granularity)
*/
#define DHCP_TIMEOUT_SIZE_T u32_t
static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min)
{
uint32_t timeout = lease;
Expand Down

0 comments on commit 1c13798

Please sign in to comment.