Answers checklist.
IDF version.
v6.x
Operating System used.
Linux
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
What is the expected behavior?
In ESP-IDF 5.x, CONFIG_LWIP_DHCPS_ADD_DNS=n allows the DHCP server to omit DNS Option 6 entirely.
This option was removed for IDF v6 in commit:
57013ba
The v6 migration guide states that DNS information can instead be suppressed by enabling ESP_NETIF_DOMAIN_NAME_SERVER and setting the DNS address to 0.0.0.0.
Expected behavior: The DNS option is omitted from DHCP when setting the DNS address to 0.0.0.0
What is the actual behavior?
The DHCP server sends the ESP's own IP-address as the DNS-server.
Steps to reproduce.
- enable ESP_NETIF_DOMAIN_NAME_SERVER and set the DNS address to 0.0.0.0
Build or installation Logs.
Diagnostic report archive.
No response
More Information.
In dhcpserver.c, if the configured DNS addresses are zero, add_offer_options() falls back to adding DHCP Option 6 containing the DHCP server's own IP address.
Therefore I don't see a way to omit DHCP Option 6 entirely after CONFIG_LWIP_DHCPS_ADD_DNS was removed.
Is the implementation or the migration documentation incorrect?
Answers checklist.
IDF version.
v6.x
Operating System used.
Linux
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
What is the expected behavior?
In ESP-IDF 5.x, CONFIG_LWIP_DHCPS_ADD_DNS=n allows the DHCP server to omit DNS Option 6 entirely.
This option was removed for IDF v6 in commit:
57013ba
The v6 migration guide states that DNS information can instead be suppressed by enabling ESP_NETIF_DOMAIN_NAME_SERVER and setting the DNS address to 0.0.0.0.
Expected behavior: The DNS option is omitted from DHCP when setting the DNS address to 0.0.0.0
What is the actual behavior?
The DHCP server sends the ESP's own IP-address as the DNS-server.
Steps to reproduce.
Build or installation Logs.
Diagnostic report archive.
No response
More Information.
In dhcpserver.c, if the configured DNS addresses are zero, add_offer_options() falls back to adding DHCP Option 6 containing the DHCP server's own IP address.
Therefore I don't see a way to omit DHCP Option 6 entirely after CONFIG_LWIP_DHCPS_ADD_DNS was removed.
Is the implementation or the migration documentation incorrect?