anchor.diff:  is_loop(Code, Vid, OH, Avps) ->
       is_loop(Code, Vid, ?BASE:avp(encode, OH, 'Route-Record'), Avps).
   
  -%% reply/4
  +%% reply/5
   %%
   %% Send a locally originating reply.
   
   %% Skip the setting of Result-Code and Failed-AVP's below.
  -reply([Msg], Dict, TPid, Pkt)
  +reply([Msg], Dict, TPid, Fs, Pkt)
     when is_list(Msg);
          is_tuple(Msg) ->
  -    reply(Msg, Dict, TPid, Pkt#diameter_packet{errors = []});
  +    reply(Msg, Dict, TPid, Fs, Pkt#diameter_packet{errors = []});
   
   %% No errors or a diameter_header/avp list.
  -reply(Msg, Dict, TPid, #diameter_packet{errors = Es,
  -                                        transport_data = TD}
  -                       = ReqPkt)
  +reply(Msg, Dict, TPid, Fs, #diameter_packet{errors = Es,
  +                                            transport_data = TD}
  +                           = ReqPkt)
     when [] == Es;
          is_record(hd(Msg), diameter_header) ->
       Pkt = diameter_codec:encode(Dict, make_answer_packet(Msg, ReqPkt)),
  +    eval_packet(Pkt, Fs),
       incr(send, Pkt, Dict, TPid),  %% count result codes in sent answers
       send(TPid, Pkt#diameter_packet{transport_data = TD});
   
   %% Or not: set Result-Code and Failed-AVP AVP's.
  -reply(Msg, Dict, TPid, #diameter_packet{errors = [H|_] = Es} = Pkt) ->
  +reply(Msg, Dict, TPid, Fs, #diameter_packet{errors = [H|_] = Es} = Pkt) ->
       reply(rc(Msg, rc(H), [A || {_,A} <- Es], Dict),
             Dict,
             TPid,
  +          Fs,
             Pkt#diameter_packet{errors = []}).
   
  +eval_packet(Pkt, Fs) ->
  +    lists:foreach(fun(F) -> diameter_lib:eval([F,Pkt]) end, Fs).
  +    
   %% make_answer_packet/2
   
   %% Binaries and header/avp lists are sent as-is.
  
positive.code: %%      if one is available, but the peer reporting the error has
  %%      identified a configuration problem.
  
  resend(true, _, _, T, {TPid, _}, Pkt) ->  %% Route-Record loop
      protocol_error(3005, T, TPid, Pkt);
  
  %% 6.1.8.  Relaying and Proxying Requests
  %%
  
negative.code:            #diameter_app{dictionary = Dict},
             _,
             {TPid, _},
             Fs,
             Pkt) ->
      reply(Ans, Dict, TPid, Fs, Pkt);
  
  %% An 3xxx result code, for which the E-bit is set in the header.
  request_cb({protocol_error, RC}, _, T, {TPid, _}, Fs, Pkt)
    when 3000 =< RC, RC < 4000 ->
      protocol_error(RC, T, TPid, Fs, Pkt);
  
  %% RFC 3588 says we must reply 3001 to anything unrecognized or
  %% unsupported. 'noreply' is undocumented (and inappropriately named)
  %% backwards compatibility for this, protocol_error the documented
  %% alternative.
  request_cb(noreply, _, T, {TPid, _}, Fs, Pkt) ->
      protocol_error(3001, T, TPid, Fs, Pkt);
  
  %% Relay a request to another peer. This is equivalent to doing an
  %% explicit call/4 with the message in question except that (1) a loop
  