anchor.diff:  %% Or try to decode.
   d(Name, Avp, {Avps, Acc}) ->
       #diameter_avp{name = AvpName,
  -                  data = Data}
  +                  data = Data,
  +                  type = Type,
  +                  is_mandatory = M}
           = Avp,
  +
  +    %% Use the process dictionary is to keep track of whether or not
  +    %% to ignore an M-bit on an encapsulated AVP. Not ideal, but the
  +    %% alternative requires widespread changes to be able to pass the
  +    %% value around through the entire decode. The solution here is
  +    %% simple in comparison, both to implement and to understand.
  +
  +    Reset = relax(Type, M),
   
       try avp(decode, Data, AvpName) of
           V ->
  
positive.code: 
  -define(THROW(T), throw({?MODULE, T})).
  
  -type parent_name()   :: atom().  %% parent = Message or AVP
  -type parent_record() :: tuple(). %%
  -type avp_name()   :: atom().
  
negative.code: %%
  %% %CopyrightBegin%
  %%
  %% Copyright Ericsson AB 2010-2014. All Rights Reserved.
  %%
  %% The contents of this file are subject to the Erlang Public License,
  %% Version 1.1, (the "License"); you may not use this file except in
  