Skip to content

net/dns: dns_get_addr_info() cannot "resolve" (parse) numeric IP addresses #3992

@zephyrbot

Description

@zephyrbot

Reported by Paul Sokolovsky:

I thought that Zephyr's DNS resolver is able to deal with numeric addresses like "192.0.2.1", but turned out it doesn't, it's my local dnsmasq what "resolved" them, only for IPv4.

On the other hand, BSD Sockets' getaddrinfo() must resolve them, which leads to the question where it should be implemented - in native DNS resolver, or on BSD Sockets level. I usually try to push as much functionality as possible down the native stack, but here I'm not sure - one of the idea might be to keep DNS resolver minimal, and well, make it resolve only DNS name, of which numeric numbers aren't. But from usability point of view, numeric addresses can be used anywhere a domain name can, so it either leads to gap in the functionality (where numeric address suddenly doesn't work), or puts extra burden on each and every app.

Please suggest.

(Imported from Jira ZEP-2562)

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions