anchor.diff:  	end.
   %% @hidden
   wait_for_commit1(BodyData, #statedata{scalar_s = ScalarS, element_s = ElementS,
  -		radius_fsm = RadiusFsm, radius_id = RadiusID,
  +		radius_fsm = RadiusFsm, radius_id = RadiusID, eap_id = NewEAPID,
   		secret = Secret, authenticator = RequestAuthenticator} = StateData) ->
   		ExpectedSize = size(<<ElementS/binary, ScalarS/binary>>),
   		case size(BodyData) of 
   			ExpectedSize ->
  -				wait_for_commit2(StateData);
  +				wait_for_commit2(BodyData, StateData);
   			_ ->
  -				send_radius_reject(RadiusID, RequestAuthenticator, Secret, RadiusFsm),
  +				send_radius_response(?Failure, NewEAPID, BodyData, ?AccessReject, RadiusID, RequestAuthenticator, Secret, RadiusFsm),
   				{error, exit}
   		end.
   %% @hidden
  -wait_for_commit2(#statedata{element_p = ElementP, scalar_p = ScalarP, scalar_s = ScalarS,
  +wait_for_commit2(BodyData, #statedata{element_p = ElementP, scalar_p = ScalarP, scalar_s = ScalarS,
   		element_s = ElementS,  radius_fsm = RadiusFsm, radius_id = RadiusID,
  -		secret = Secret, authenticator = RequestAuthenticator} = StateData) ->
  +		secret = Secret, authenticator = RequestAuthenticator, eap_id = NewEAPID} = StateData) ->
   	case {ElementP, ScalarP} of
   		{ElementS, ScalarS} ->
  -			send_radius_reject(RadiusID, RequestAuthenticator, Secret, RadiusFsm),
  +			send_radius_response(?Failure, NewEAPID, BodyData, ?AccessReject, RadiusID, RequestAuthenticator, Secret, RadiusFsm),
   			{error, exit};
   		_ ->
  -			wait_for_commit3(StateData)
  +			wait_for_commit3(BodyData, StateData)
   	end.
   %% @hidden
  -wait_for_commit3(#statedata{scalar_p = ScalarP, radius_fsm = RadiusFsm, radius_id = RadiusID,
  -		secret = Secret, authenticator = RequestAuthenticator} = _StateData)->
  +wait_for_commit3(BodyData, #statedata{scalar_p = ScalarP, radius_fsm = RadiusFsm, radius_id = RadiusID,
  +		secret = Secret, authenticator = RequestAuthenticator, eap_id = NewEAPID} = _StateData)->
   	case ScalarP of
   		_ScalarP_Valid when  1 =< ScalarP, ScalarP >= $R ->
   			ok;
   		_ScalarP_Out_of_Range ->
  -			send_radius_reject(RadiusID, RequestAuthenticator, Secret, RadiusFsm),
  +			send_radius_response(?Failure, NewEAPID, BodyData, ?AccessReject, RadiusID, RequestAuthenticator, Secret, RadiusFsm),
   			{error, exit}
   	end.
   
  
positive.code: 					case MK_S of
  						MK_P ->
  							NewEapID = EapID + 1,
  							send_radius_success(NewEapID, <<>>, RadiusID, RequestAuthenticator, Secret, RadiusFsm),
  							{next_state, wait_for_confirm, StateData, ?TIMEOUT};
  						_ ->
  							NewEapID = EapID + 1,
  
negative.code: 	AttributeList2 = radius_attributes:store(?MessageAuthenticator,
  		<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, AttributeList1),
  	AttrList2bin = radius_attributes:codec(AttributeList2),
  	Response1 = #radius{code = RadiusCode, id = RadiusID,
  		authenticator = RequestAuthenticator, attributes = AttrList2bin},
  	ResponsePacket1 = radius:codec(Response1),
  	MessageAuthenticator = crypto:hmac(md5, Secret, ResponsePacket1),
  