Skip to content

ESP-IDF v6 migration guide says DHCP DNS can be suppressed, but implementation always sends Option 6 (IDFGH-18178) #19004

Description

@dorianim

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

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.

  1. 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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions