Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

espressif: ipv6: Disable RDNSS #9713

Merged
merged 1 commit into from
Oct 15, 2024
Merged

espressif: ipv6: Disable RDNSS #9713

merged 1 commit into from
Oct 15, 2024

Conversation

jepler
Copy link
Member

@jepler jepler commented Oct 12, 2024

Recursive DNS Server (RDNSS) is an extension of IPv6 Neighbor Discovery. It is one of several ways (in addition to DHCPv6) to inform a network node of a usable DNS server.

In LWIP, it appears any RDNSS DNS server will overwrite a DNS server from DHCPv4 or manual configuration, whether or not CircuitPython has an IPv6 address configured.

In the (default) case where DHCPv6 is disabled in CircuitPython, but the (apparently rare) case where a RDNSS advertisement is broadast, this means that DNS doesn't work, and it appears that assigning to the dns or ipv4_dns properties of the Radio object doesn't work (when in reality it's frequently being reset to the value from RDNSS)

On my network, the same DNS server is advertised by DHCPv6, so with this change I still get a working v6 configuration with a v6 DNS server when I enable DHCPv6, but when configuring as v4 only (the default), the correct IPv4 DNS server setting happens and I can also manually change it by assigning .dns or .ipv4_dns.

Closes: #9712

Recursive DNS Server (RDNSS) is an extension of IPv6 Neighbor Discovery.
It is one of several ways (in addition to DHCPv6) to inform a network
node of a usable DNS server.

In LWIP, it appears any RDNSS DNS server will overwrite a DNS server
from DHCPv4 or manual configuration, whether or not CircuitPython has
an IPv6 address configured.

In the (default) case where DHCPv6 is disabled in CircuitPython, but the
(apparently rare) case where a RDNSS advertisement is broadast,
this means that DNS doesn't work, and it appears that assigning to
the dns or ipv4_dns properties of the Radio object doesn't work
(when in reality it's frequently being reset to the value from RDNSS)

On my network, the same DNS server is advertised by DHCPv6, so with this
change  I still get a working v6 configuration with a v6 DNS server
when I enable DHCPv6, but when configuring as v4 only (the default),
the correct IPv4 DNS server setting happens and I can also manually
change it by assigning .dns or .ipv4_dns.
@jepler
Copy link
Member Author

jepler commented Oct 12, 2024

Just based on some grepping around it looks like micropython takes the default value of 0 for CONFIG_LWIP_IPV6_RDNSS_MAX_DNS_SERVERS which if correct makes me feel better about taking this change.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for figuring this out!

@tannewt tannewt merged commit e345f77 into adafruit:main Oct 15, 2024
219 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DNS configuration problems, wifi.radio.dns properties can't be manually set
2 participants