[getdns-api] Spec change request: Set suffixes from OS

Sara Dickinson sara at sinodun.com
Thu Mar 24 12:52:16 CET 2016


+1 on both this and the proposed change to the getdns_context_set_append_name()  default value

Sara

> On 24 Mar 2016, at 09:30, Willem Toorop <willem at nlnetlabs.nl> wrote:
> 
> Op 23-03-16 om 22:46 schreef Willem Toorop:
>> Dear all,
>> 
>> The current spec (in paragraph 8.5 https://getdnsapi.net/spec.html#8.5 )
>> states that the default suffixes is "an empty list".
>> 
>> I propose to change this to "set from the OS when the context is created
>> with the "set_from_os" parameter set, otherwise an empty list".
>> 
>> This would be consistent with how other settings are "set from the OS",
>> such as for example the upstream recursive servers.
>> 
>> The complete text will then become:
>> 
>> 
>> 	getdns_return_t
>> 	getdns_context_set_suffix(
>> 	  getdns_context  *context,
>> 	  getdns_list     *value
>> 	);
>> 
>> 	The value is a list of bindatas that are strings that are to
>> 	be appended based on getdns_context_set_append_name; the
>> 	default is an set from the OS when the context is created with
> 
> Sorry, the "an" was unintended.  "set" was meant to be a verb.  So the
> sentence should be:
> 
> 	the default is set from the OS when the context is created with
> 	the "set_from_os" parameter set, otherwise an empty list.
> 
> The terminology "set from OS" is perhaps a little vague, but it is
> coming from the spec (and not from me the implementer). The spec
> elaborates a little more in 4th paragraph of section 8 (
> https://getdnsapi.net/spec.html#8. ) where it says:
> 
> 	When the context is used in the API for the first time and
> 	set_from_os is 1, the API starts replacing some of the values
> 	with values from the OS, such as those that would be found in
> 	res_query(3), /etc/resolv.conf, and so on, then proceeds with
> 	the new function.
> 
> In our implementation we construct the suffix list from the "domain" and
> "search" options from /etc/resolv.conf in unix like systems, and read it
> from the registry location
> HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters
> or HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/VxD/MSTCP
> keys "Domain", "DhcpDomain" and "SearchList" on windows.  This is also
> what ldns and Net::DNS do, and what getaddrinfo() does by default.
> 
> Note that the text also mentions that you have to create the context
> with the set_from_OS argument of the getdns_context_create() function
> set.  If you create a context without that parameter, then you do not
> read the upstreams and suffixes from /etc/resolv.conf.
> 
> I would also be happy to have the getdns_context_set_append_name()
> default value to be GETDNS_APPEND_NAME_NEVER .  It is just that current
> default value is not what people are used to expect, so I want it to be
> more what is conventional.
> 
> 
> -- Willem
> 
> 
>> 	the "set_from_os" parameter set, otherwise an empty list. The
>> 	values here follow the rules in section 2.1 of RFC 4343 to
>> 	allow non-ASCII octets and special characters in labels.
>> 
>> 
>> Do you agree?
>> 
>> I would appreciate a response on short notice as I am about to do the
>> 1.0beta release very soon (preferable before the DNS-OARC and IETF95).
>> 
>> Thanks,
>> 
>> -- Willem
>> _______________________________________________
>> spec mailing list
>> spec at getdnsapi.net
>> 
> 
> _______________________________________________
> spec mailing list
> spec at getdnsapi.net




More information about the spec mailing list