anchor.diff:  					EapPacket = #eap_packet{code = failure, identifier = NewEapID},
   					send_diameter_response(SessionId, AuthType,
   							?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OHost, ORealm,
  -							EapPacket, PortServer),
  +							EapPacket, PortServer, Request, StateData),
   					{stop, {shutdown, SessionId}, StateData};
   				{'EXIT', _Reason} ->
   					EapPacket = #eap_packet{code = failure, identifier = EapID},
   					send_diameter_response(SessionId, AuthType,
   							?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OHost, ORealm,
  -							EapPacket, PortServer),
  +							EapPacket, PortServer, Request, StateData),
   					{stop, {shutdown, SessionId}, StateData}
   			end
   	end.
  
positive.code: 					RequestAuthenticator, RequestAttributes, NewStateData),
  			{stop, {shutdown, SessionID}, NewStateData}
  	end;
  id(#diameter_eap_app_DER{} = Response, #statedata{eap_id = EapID,
  		group_desc = GroupDesc, rand_func = RandFunc, prf = PRF,
  		session_id = SessionID, auth_req_type = RequestType,
  		origin_host = OHost, origin_realm = ORealm,
  		diameter_port_server = PortServer} = StateData) ->
  	try
  		EapMessage = Response#diameter_eap_app_DER.'EAP-Payload',
  		case ocs_eap_codec:eap_packet(EapMessage) of
  			#eap_packet{code = response, type = ?PWD, identifier = EapID,
  					data = Data} -> 
  
negative.code: 			EapPacket = #eap_packet{code = failure, identifier = EapID},
  			send_diameter_response(SessionID, AuthType,
  					 ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OH, OR,
  					 EapPacket, PortServer, Request, StateData),
  			{stop, {shutdown, SessionID}, StateData};
  		_ ->
  			commit7(Request, StateData)
  	end.
  %% @hidden
  commit7(Request, #statedata{scalar_p = ScalarP, eap_id = EapID, session_id = SessionID,
  		auth_req_type = AuthType, origin_host = OH, origin_realm = OR,
  	diameter_port_server = PortServer} = StateData)->
  	case ScalarP of
  		<<ScalarP_Valid:256>> when 1 < ScalarP_Valid, ScalarP_Valid < ?R ->
  			commit8(Request, StateData);
  		_ScalarP_Out_of_Range ->
  			EapPacket = #eap_packet{code = failure, identifier = EapID},
  			send_diameter_response(SessionID, AuthType,
  					 ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OH, OR,
  					 EapPacket, PortServer, Request, StateData),
  			{stop, {shutdown, SessionID}, StateData}
  	end.
  %% @hidden
  commit8(Request, #statedata{eap_id = EapID, session_id = SessionID, scalar_p = ScalarP,
  		element_p = ElementP, scalar_s = ScalarS, element_s = ElementS,
  		s_rand = Srand, pwe = PWE, group_desc = GroupDesc, rand_func = RandFunc,
  		prf = PRF, auth_req_type = AuthType, origin_host = OH,
  