mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
DHCP request send on reboot does not contain hostname option
When the network is changed, dhcp is rebooted. It will send a dhcp request again to verify it's lease. DHCP requests are send out in selecting state, rebinding, renewing and rebooting. But in the rebooting state the hostname option is not included. This means that after reboot, the hostname will be unknown to the DNS. Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
parent
7b8a784c4f
commit
d65681a7d7
@ -1286,6 +1286,11 @@ dhcp_reboot(struct netif *netif)
|
||||
for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) {
|
||||
options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]);
|
||||
}
|
||||
|
||||
#if LWIP_NETIF_HOSTNAME
|
||||
options_out_len = dhcp_option_hostname(options_out_len, msg_out->options, netif);
|
||||
#endif /* LWIP_NETIF_HOSTNAME */
|
||||
|
||||
LWIP_HOOK_DHCP_APPEND_OPTIONS(netif, dhcp, DHCP_STATE_REBOOTING, msg_out, DHCP_REQUEST, &options_out_len);
|
||||
dhcp_option_trailer(options_out_len, msg_out->options, p_out);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user