getdnsapi / getdns

A modern asynchronous DNS API https://getdnsapi.net/
Other
461 stars 127 forks source link

The default context should have GETDNS_RESOLUTION_STUB #516

Open Philip-NLnetLabs opened 2 years ago

Philip-NLnetLabs commented 2 years ago

Current the spec (Section 8·3, Contexts for Basic Resolution) requires contexts to default to GETDNS_RESOLUTION_RECURSING.

This is confusing because it means that by default, getdns will ignore the system's local recursive resolvers. This means that, for example, local zones configured on recursive resolvers will be unavailable, queries go out over the internet by default. And some networks block access to the root DNS servers.

Possible solutions: update the documentation that with the introduction of getdns_context_create, the need for GETDNS_RESOLUTION_STUB is discussed immediately. And change the examples to include GETDNS_RESOLUTION_STUB as well.

Longer term, either an incompatible change to the API specification. Or, to deprecate getdns_context_create in favor of a new function (getdns_context_create2) that has a different default.