anchor.diff:  %% Step 1: Set the RA bit to false as we do not handle recursive queries.
   resolve(Message, AuthorityRecords, {ClientIP, ServerIP}, Question) when is_record(Question, dns_query) ->
       resolve(Message#dns_message{ra = false}, AuthorityRecords, Question#dns_query.name,
  -            Question#dns_query.type, {ClientIP, ServerIP}).
  +            Question#dns_query.type, {ClientIP, ServerIP}, erldns_config:get_mode()).
   
   %% With the extracted Qname and Qtype in hand, find the nearest zone
   %% Step 2: Search the available zones for the zone which is the nearest ancestor to QNAME
  -resolve(Message, _AuthorityRecords, Qname, ?DNS_TYPE_AXFR = _Qtype, {ClientIP, ServerIP}) ->
  +resolve(Message, _AuthorityRecords, Qname, ?DNS_TYPE_AXFR = _Qtype, {ClientIP, ServerIP}, _Mode) ->
       {ok, Zone} = erldns_zone_cache:get_zone_with_records(Qname), % Zone lookup
       %%  Check to make sure the requester is allowed the axfr, and that the server is the master for
       %%  the zone
  
positive.code:     resolve(Message, AuthorityRecords, {ClientIP, ServerIP}, Message#dns_message.questions).
  
  %% There were no questions in the message so just return it.
  -spec resolve(dns:message(), [dns:rr()], dns:ip(), dns:ip(), [dns:question()]) -> dns:message().
  resolve(Message, _AuthorityRecords, {_ClientIP, _ServerIP}, []) -> Message;
  %% There is one question in the message; resolve it.
  resolve(Message, AuthorityRecords, {ClientIP, ServerIP}, [Question]) ->
  
negative.code:             Message#dns_message{aa = true, rc = ?DNS_RCODE_NOERROR}
      end;
  
  %% An SOA was found, thus we are authoritative and have the zone, and we are 'public'.
  %% Step 3: Match records
  get_matched_records(Message, Qname, Qtype, Zone, {ClientIP, ServerIP}, CnameChain) ->
      Records = erldns_zone_cache:retrieve_records(ServerIP, Qname),
      resolve_records(Message, Qname, Qtype, Records, {ClientIP, ServerIP}, CnameChain, Zone).
  
  %% There were no exact matches on name, so move to the best-match resolution.
  resolve_records(Message, Qname, Qtype, _MatchedRecords = [], {ClientIP, ServerIP}, CnameChain, Zone) ->
      best_match_resolution(Message, Qname, Qtype, {ClientIP, ServerIP}, CnameChain,
                            best_match(Qname, Zone), Zone);
  
  %% There was at least one exact match on name.
  resolve_records(Message, Qname, Qtype, MatchedRecords, {ClientIP, ServerIP}, CnameChain, Zone) ->
      exact_match_resolution(Message, Qname, Qtype, {ClientIP, ServerIP}, CnameChain, MatchedRecords, Zone).
  
  %% Determine if there is a CNAME anywhere in the records with the given Qname.
  