Skip to content

IPv6 DNS servers are not received correctly #5561

Closed
@davefiddes

Description

@davefiddes

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: WeMos D1 R1 clone
  • Core Version: e3bc3c2
  • Development Env: Arduino IDE
  • Operating System: Fedora 29

Settings in IDE

  • Module: WeMos D1 R1
  • Flash Mode: Board default
  • Flash Size: 4MB (No SPIFFS)
  • lwip Variant: v2 IPv6 Lower Memory & v2 IPv6 Higher Bandwidth
  • Reset Method: Board default
  • Flash Frequency: Board default
  • CPU Frequency: 80Mhz
  • Upload Using: SERIAL
  • Upload Speed: 921600

Problem Description

I am testing the IPv6.ino sample on my home network which has both IPv4 DHCP and IPv6 DHCPv6 support. Both DHCP protocols deliver DNS server addresses to clients. The IPv6.ino sample fails to resolve the two domains as the DNS server address used is gibberish. Occasionally DHCPv4 wins the race condition within the stack and the IP address is the network IPv4 DNS server. As my DNS server is dual-stacked it is able to resolve all domains.

MCVE Sketch

ESP8266WiFi | IPv6 example

I have deleted the line below for clarity in the output:

dns_setserver(DNS_MAX_SERVERS - 1, IPAddress(8, 8, 8, 8));

Debug Messages

Broken DNS IPv6 address (it should be 2001:470:XXXX:2b6::3)

------------------------------
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0-beta2-15-ge3bc3c22=20499902/lwIP:IPv6+STABLE-2_1_2_RELEASE/glue:1.0-5-g51b2d6c/BearSSL:2398cc6
dns0: 32.1.4.112 IPv6:No
Try me at these addresses:
(with 'telnet <addr> or 'nc -u <addr> 23')
IF='st' IPv6=0 local=0 hostname='ipv6test' addr= 192.168.1.237 / mask:255.255.255.0 / gw:192.168.1.1
IF='st' IPv6=1 local=1 hostname='ipv6test' addr= fe80::a220:a6ff:feXX:XXXX
IF='st' IPv6=1 local=0 hostname='ipv6test' addr= 2001:470:XXXX:2b6:a220:a6ff:feXX:XXXX
resolving www.google.com: timeout or not found
resolving ipv6.google.com: timeout or not found
------------------------------

Working IPv4 DNS server address:

------------------------------
SDK:3.0.0-dev(c0f7b44)/Core:2.5.0-beta2-15-ge3bc3c22=20499902/lwIP:IPv6+STABLE-2_1_2_RELEASE/glue:1.0-5-g51b2d6c/BearSSL:2398cc6
dns0: 192.168.1.3 IPv6:No
Try me at these addresses:
(with 'telnet <addr> or 'nc -u <addr> 23')
IF='st' IPv6=0 local=0 hostname='ipv6test' addr= 192.168.1.237 / mask:255.255.255.0 / gw:192.168.1.1
IF='st' IPv6=1 local=1 hostname='ipv6test' addr= fe80::a220:a6ff:feXX:XXXX
IF='st' IPv6=1 local=0 hostname='ipv6test' addr= 2001:470:XXXX:2b6:a220:a6ff:feXX:XXXX
resolving www.google.com: 172.217.19.68
resolving ipv6.google.com: 2a00:1450:4013:c01::8a
------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions