MQX 4.2.0.2 DHCP client lease renewal issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX 4.2.0.2 DHCP client lease renewal issue

1,412 Views
kfranz
Contributor III

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?

//example

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

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


DHCPCLNT_service_ack()

{

...

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

      }/* Endif */

...

}

Labels (1)
0 Kudos
3 Replies

980 Views
kfranz
Contributor III

Are you saying that since the lease period has changed, that means the DHCP server does not want to renew the current lease? I thought the DHCP server is allowed to change the lease period as a part of the lease renewal?

Regards,

Kevin

0 Kudos

980 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi kfranz 

I would suggest you check the following link, a similar issue about DHCP client.  Maybe you can try the customer's solution to see whether it helps

TCPIP Event timing error in MQX 4.2 

Regards

Daniel

0 Kudos

980 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Kfranz:

It seems the DHCP server does not wish to renew the current lease, then only the terminate event will be set for the remainder of the lease. wait for termination to bind again.

Regards

Daniel

0 Kudos