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: 
  %% The CNAME is in the zone so we do not need to look it up again.
  restart_query(Message, Name, Qtype, {ClientIP, ServerIP}, CnameChain, Zone, true) ->
      get_matched_records(Message, Name, Qtype, Zone, {ClientIP, ServerIP}, CnameChain);
  %% The CNAME is not in the zone, so we need to find the zone using the
  %% CNAME content.
  restart_query(Message, Name, Qtype, {ClientIP, ServerIP}, CnameChain, _Zone, false) ->
      get_matched_records(Message, Name, Qtype, erldns_zone_cache:find_zone(Name), {ClientIP, ServerIP}, CnameChain).
  
  %% Delegated, but in the same zone.
  restart_delegated_query(Message, Name, Qtype, {ClientIP, ServerIP}, CnameChain, Zone, true) ->
      get_matched_records(Message, Name, Qtype, Zone, {ClientIP, ServerIP}, CnameChain);
  %% Delegated to a different zone.
  restart_delegated_query(Message, Name, Qtype, {ClientIP, ServerIP}, CnameChain, Zone, false) ->
      get_matched_records(Message, Name, Qtype, erldns_zone_cache:find_zone(Name, Zone#zone.authority),
              {ClientIP, ServerIP}, CnameChain). % Zone lookup
  
  
  