Skip to content

Base DNS code defaults to type A queries on IPv6 interfaces #3145

Closed
@kjbracey

Description

@kjbracey
  • Type: Bug
  • Priority: Major

If the base DNS code is in use, eg for Nanostack rather than lwIP, no attempt is made to perform the correct type of address query by default. SocketAddress(iface, "ntp.pool.org"), as seen in the CLI test app, will perform an IPv4 A type lookup when using Nanostack and iface is IPv6 only.

At some point in the lwIP IPv6 development we had the top level gethostbyname() do a check for iface->get_ip_address() containing a ':', and requesting IPv6 if so. This fell out after one of the NetworkStack/NetworkInterface shuffles caused a problem (which I do not recall).

The lwIP implementation has a similar "A or AAAA based on indicated interface address" heuristic built-in - it would be redundant if done at the generic layers.

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