eclipse-threadx / netxduo

Eclipse ThreadX - NetXDuo is an advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/index.md
MIT License
230 stars 131 forks source link

Issue in DHCPv6 Client #206

Closed swamidas1998 closed 7 months ago

swamidas1998 commented 8 months ago

Bug We observed one issue when running the dhcpv6 client.

1) In the DHCPv6 client code, We saw an issue in which the SOLICIT request message is been continuously sent infinite times if the client doesn't get an ADVERTISE reply for a SOLICIT request message. Due to this, the DHCPv6 continues the process forever and never returns.

2) My observation here is, nx_dhcpv6_max_retransmission_count This variable is not updating correctly, During SOLICIT this variable is set to 0 and so as the 0 is ignored in the _nx_dhcpv6_update_retransmit_info and not considering the count of SOLICIT messages stored in the nx_dhcpv6_retransmission_count

Thanks, Swamidas

wenhui-xie commented 8 months ago

Hi @swamidas1998, nx_dhcpv6_max_retransmission_count is set to NX_DHCPV6_MAX_SOL_RETRANSMISSION_COUNT. The default value of NX_DHCPV6_MAX_SOL_RETRANSMISSION_COUNT is 0, which means no limit to the retransmission count. You can redefine the NX_DHCPV6_MAX_SOL_RETRANSMISSION_COUNT in nx_user.h or project options to enable the retransmission limit.

swamidas1998 commented 8 months ago

Hi, @wenhui-xie I don't see the macro NX_DHCPV6_MAX_SOL_RETRANSMISSION_COUNT is assigned to the nx_dhcpv6_max_retransmission_count variable anywhere.

wenhui-xie commented 8 months ago

Hi @swamidas1998, which version are you using? For the latest release, the assignment of nx_dhcpv6_max_retransmission_count is in function _nx_dhcpv6_request_solicit line 7943.

wenhui-xie commented 7 months ago

Closing.