AnsweredAssumed Answered

MQX DHCP client lease renewal issue

Question asked by kfranz on Dec 18, 2017
Latest reply on Mar 20, 2018 by Daniel Chen

We have a customer that has captured Wireshark data showing that the DHCP lease is expiring. Investigation has determined the cause is in .\Freescale_MQX_4_2\rtcs\source\tcpip\dhcpclnt.c\DHCPCLNT_service_ack(). Normally the lease is renewed at 1/2 the lease interval. When the device receives the ack to the renewal request it gets a lease period which is shorter than the current lease period. Because of this, the DHCP client decides to let the lease to expire.


When the new lease is less than the old lease why does the DHCP client decide it should not renew the lease?


Is this a bug? If so, how should I fix it?




dhcp_ptr->NEW_DATA.LEASE = 10800; //ie 3 hours

dhcp_ptr->DATA.LEASE = 14400; //ie. 4 hours




      if (dhcp_ptr->NEW_DATA.LEASE < dhcp_ptr->DATA.LEASE) {
         /* Our request was refused, wait for termination to bind again */
         renew_again = FALSE;

      }/* Endif */