anchor.diff:    resolve_best_match_referral(Message, Qname, Qtype, Host, CnameChain, BestMatchRecords, Zone, ReferralRecords).
   
   
  -
  +% There is no referral, so check to see if there is a wildcard.
   resolve_best_match(Message, Qname, Qtype, Host, CnameChain, BestMatchRecords, Zone) ->
     %lager:debug("No referrals found"),
     resolve_best_match(Message, Qname, Qtype, Host, CnameChain, BestMatchRecords, Zone, lists:any(erldns_records:match_wildcard(), BestMatchRecords)).
  
positive.code: -include("erldns.hrl").
  
  -export([resolve/3]).
  
  %% Internal API
  -export([resolve/6]).
  -export([requires_additional_processing/2, additional_processing/3, additional_processing/4]).
  
  
  %% Resolve the questions in the message.
  resolve(Message, AuthorityRecords, Host) ->
  
negative.code:   % It isn't clear what the QTYPE should be on a delegated restart. I assume an A record.
    restart_delegated_query(Message, Name, ?DNS_TYPE_A, Host, CnameChain, Zone, erldns_zone_cache:in_zone(Name));
  
  %% There was an exact type match for an NS query and an SOA record.
  resolve_exact_type_match(Message, _Qname, ?DNS_TYPE_NS, _Host, _CnameChain, MatchedRecords, _Zone, _AuthorityRecords) ->
    %lager:debug("Authoritative for record, returning answers"),
    Message#dns_message{aa = true, rc = ?DNS_RCODE_NOERROR, answers = Message#dns_message.answers ++ MatchedRecords};
  
  %% There was an exact type match for something other than an NS record and we are authoritative because there is an SOA record.
  resolve_exact_type_match(Message, Qname, Qtype, Host, CnameChain, MatchedRecords, Zone, _AuthorityRecords) ->
    % NOTE: this is a potential bug because it assumes the last record is the one to examine.
    Answer = lists:last(MatchedRecords),
    SoaRecordResult = erldns_zone_cache:get_authority(Qname),
    case NSRecords = erldns_zone_cache:get_delegations(Answer#dns_rr.name) of
  