anchor.diff:      [RR | filter_rr(RRs, Time)];
   filter_rr([], _Time) ->  [].
   
  +%% Lower case the domain name before storage.
  +%%
  +lower_rr(#dns_rr{domain=Domain}=RR) when is_list(Domain) ->
  +    RR#dns_rr { domain = tolower(Domain) };
  +lower_rr(RR) -> RR.
   
   %%
   %% Case fold upper-case to lower-case according to RFC 4343
  
positive.code: %% match data field directly and cache RRs.
  %%
  res_hostent_by_domain(Domain, Type, Rec) ->
      res_cache_answer(Rec),
      RRs = Rec#dns_rec.anlist,
      ?dbg("res_hostent_by_domain: ~p - ~p~n", [Domain, RRs]),
      res_hostent_by_domain(stripdot(Domain), [], Type, RRs).
  
  res_hostent_by_domain(Domain, Aliases, Type, RRs) ->
      case res_lookup_type(Domain, Type, RRs) of
  	[] ->
  	    case res_lookup_type(Domain, ?S_CNAME, RRs) of
  		[] ->  
  		    {error, nxdomain};
  		[CName | _] ->
  		    case lists:member(CName, [Domain | Aliases]) of
  			true -> 
  			    {error, nxdomain};
  			false ->
  			    res_hostent_by_domain(CName, [Domain | Aliases],
  						  Type, RRs)
  		    end
  	    end;
  	Addrs ->
  
negative.code: %% lookup and remove old entries
  
  do_lookup_rr(Domain, Class, Type) ->
      match_rr(#dns_rr{domain = tolower(Domain), class = Class,type = Type,
  		     cnt = '_', tm = '_', ttl = '_',
  		     bm = '_', func = '_', data = '_'}).
  
  