anchor.diff:  		#eap_packet{code = response, type = ?AKAprime, identifier = EapID,
   				data = Data} = ocs_eap_codec:eap_packet(EapMessage),
   		case ocs_eap_codec:eap_aka(Data) of
  -			#eap_aka_challenge{} = EAP ->
  -				{stop, {shutdown, SessionID}, StateData};
  -			% #eap_aka_synchronization_failure{auts = _AUTS} = EAP ->
  -			% @todo handle resynchronization
  -			#eap_aka_authentication_reject{} = EAP ->
  +			#eap_aka_notification{mac = undefined} = _EAP ->
   				EapPacket1 = #eap_packet{code = failure, identifier = EapID},
   				send_radius_response(EapPacket1, ?AccessReject, [], RadiusID,
   						RequestAuthenticator, RequestAttributes, NewStateData),
  -				{stop, {shutdown, SessionID}, NewStateData};
  -			#eap_aka_client_error{client_error_code :: Code}) ->
  -				EapPacket1 = #eap_packet{code = failure, identifier = EapID},
  -				send_radius_response(EapPacket1, ?AccessReject, [], RadiusID,
  -						RequestAuthenticator, RequestAttributes, NewStateData),
  -				{stop, {shutdown, SessionID}, StateData}
  +				{stop, {shutdown, SessionID}, NewStateData}
  +			% #eap_aka_notification{mac = MAC} = _EAP ->
  +			% @todo Handle notification when P=0
   		end
   	catch
   		_:_Reason ->
  
positive.code: challenge(#diameter_eap_app_DER{'EAP-Payload' = EapMessage} = Request,
  		#statedata{eap_id = EapID, session_id = SessionID,
  		auth_req_type = AuthReqType, origin_host = OHost,
  		origin_realm = ORealm, auc_fsm = AucFsm, id_req = IdReq,
  		diameter_port_server = PortServer, keys = Keys} = StateData) ->
  	try
  		#eap_packet{code = response, type = ?AKAprime, identifier = EapID,
  				data = Data} = ocs_eap_codec:eap_packet(EapMessage),
  		case ocs_eap_codec:eap_aka(Data) of
  			#eap_aka_challenge{} = EAP ->
  				{stop, {shutdown, SessionID}, StateData};
  			% #eap_aka_synchronization_failure{auts = _AUTS} = EAP ->
  			% @todo handle resynchronization
  			#eap_aka_authentication_reject{} = EAP ->
  				EapPacket1 = #eap_packet{code = failure, identifier = EapID},
  				send_diameter_response(SessionID, AuthReqType,
  						?'DIAMETER_BASE_RESULT-CODE_AUTHENTICATION_REJECTED',
  						OHost, ORealm, EapPacket1, PortServer, Request, StateData),
  				{stop, {shutdown, SessionID}, StateData};
  			#eap_aka_client_error{client_error_code :: Code}) ->
  				EapPacket1 = #eap_packet{code = failure, identifier = EapID},
  				send_diameter_response(SessionID, AuthReqType,
  						?'DIAMETER_BASE_RESULT-CODE_AUTHENTICATION_REJECTED',
  
negative.code: -export([]).
  
  %% export the ocs_eap_aka_fsm state callbacks
  -export([eap_start/2, identity/2, vector/2, challenge/2, failure/2]).
  
  %% export the call backs needed for gen_fsm behaviour
  -export([init/1, handle_event/3, handle_sync_event/4, handle_info/3,
  