API: Provide adns_qf_cname_strict
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 23 Oct 2014 19:31:48 +0000 (20:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 24 Oct 2014 17:59:10 +0000 (18:59 +0100)
In the medium term we want to make adns tolerate cname chains better.
One thing we want to do is to change the default to be
adns_qf_cname_loose.

So introduce a flag now that allows applications to explicitly request
strict.  For now this new flag has no effect.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/adns.h

index e248c10..51b489b 100644 (file)
@@ -130,6 +130,7 @@ typedef enum { /* In general, or together the desired flags: */
  adns_qf_quoteok_anshost=0x00000040,/*  ... in things supposedly hostnames */
  adns_qf_quotefail_cname=0x00000080,/* refuse if quote-req chars in CNAME we go via */
  adns_qf_cname_loose=    0x00000100,/* allow refs to CNAMEs - without, get _s_cname */
+ adns_qf_cname_strict=   0x00010000,/* forbid CNAME refs (default, currently) */
  adns_qf_cname_forbid=   0x00000200,/* don't follow CNAMEs, instead give _s_cname */
 
  adns_qf_want_ipv4=     0x00000400,/* try to return IPv4 addresses */