anchor.diff:  			update_session3(T, SessionAttributes)
   	end.
   
  +-spec extract_session_attributes(Attributes) -> SessionAttributes
  +	when
  +		Attributes :: radius_attributes:attributes(),
  +		SessionAttributes :: radius_attributes:attributes().
  +%% @doc Extract and return RADIUS session related attributes from
  +%% `Attributes'.
  +%% @hidden
  +extract_session_attributes(Attributes) ->
  +	F = fun({K, _}) when K == ?NasIdentifier; K == ?NasIpAddress;
  +				K == ?UserName; K == ?FramedIpAddress; K == ?NasPort;
  +				K == ?NasPortType; K == ?CalledStationId; K == ?CallingStationId;
  +				K == ?AcctSessionId; K == ?AcctMultiSessionId; K == ?NasPortId;
  +				K == ?OriginatingLineInfo; K == ?FramedInterfaceId;
  +				K == ?FramedIPv6Prefix ->
  +			true;
  +		(_) ->
  +			false
  +	end,
  +	lists:filter(F, Attributes).
  
positive.code: 			{error, Reason}
  	end.
  %% @hidden
  update_session1(AcctSessionId, SessionIdentification, SessionLists) ->
  	update_session2(AcctSessionId, SessionIdentification, SessionLists, []).
  %% @hidden
  update_session2(_AcctSessionId, _SessionIdentification, [], Acc) ->
  	Acc;
  update_session2(AcctSessionId, SessionIdentification, [{TS, SessionAttributes} = H | T] = S, Acc) ->
  	case update_session3(SessionIdentification, SessionAttributes) of
  		true ->
  			case lists:keyfind(?AcctSessionId, 1, SessionAttributes) of
  				{_, _} ->
  					S ++ Acc;
  				false ->
  					Identification = radius_attributes:store(?AcctSessionId,
  							AcctSessionId, SessionAttributes),
  					NewAcc = [{TS, Identification} | T],
  					NewAcc ++ Acc
  			end;
  		false ->
  			update_session2(AcctSessionId, SessionIdentification, T, [H | Acc])
  	end.
  %% @hidden
  update_session3([], _SessionAttributes) ->
  
negative.code: 			{reply, {error, ignore}, State}
  	end.
  %% @hidden
  request1(?AccountingStart, _AcctSessionId, Id,
  		Authenticator, Secret, NasId, Address, _AccPort, _ListenPort, Attributes,
  		#state{address = ServerAddress, port = ServerPort} = State) ->
  	SessionAttributes = extract_session_attributes(Attributes),
  	SessionIdentification = [{?NasIdentifier, NasId}, {?NasIpAddress, Address}],
  	{ok, Subscriber} = radius_attributes:find(?UserName, Attributes),
  	case update_session(Subscriber, SessionAttributes, SessionIdentification) of
  		ok ->
  			ok = ocs_log:acct_log(radius, {ServerAddress, ServerPort}, start, Attributes),
  			{reply, {ok, response(Id, Authenticator, Secret)}, State};
  