anchor.diff:  		origin_realm = {ORealm, _DRealm}} = _Capabilities,
   		#'3gpp_s6a_ULR'{'Session-Id' = SId,
   		'User-Name' = IMSI, 'ULR-Flags' = RequestFlags}) ->
  +	SkipSub = case RequestFlags of
  +		[<<_:29, 1:1, _:2>>] ->
  +			true;
  +		_ ->
  +			false
  +	end,
   	case ocs:find_service(IMSI) of
  -		{ok, #service{}} when (RequestFlags band 4) =:= 4 ->
  +		{ok, #service{}} when SkipSub ->
   			{reply, #'3gpp_s6a_ULA'{'Session-Id' = SId,
  -					'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  +					'Result-Code' = [?'DIAMETER_BASE_RESULT-CODE_SUCCESS'],
   					'Auth-Session-State' =  ?'3GPP_S6A_AUTH-SESSION-STATE_NO_STATE_MAINTAINED',
   					'Origin-Host' = OHost, 'Origin-Realm' = ORealm}};
   		{ok, #service{}} ->
  -			_AMBR = #'3gpp_s6a_AMBR'{'Max-Requested-Bandwidth-UL' = 4294967296,
  -					'Max-Requested-Bandwidth-DL' = 4294967296},
   			ApnConfig = #'3gpp_s6a_APN-Configuration'{'Service-Selection' = "*",
   					'PDN-Type' =  ?'3GPP_S6A_3GPP-PDP-TYPE_IPV4'},
   			ApnProfile = #'3gpp_s6a_APN-Configuration-Profile'{'Context-Identifier' = 1,
  -					'APN-Configuration' = ApnConfig},
  -			SubscriptionData = #'3gpp_s6a_Subscription-Data'{'AMBR' = [],
  -					'APN-Configuration-Profile' = ApnProfile},
  +					'APN-Configuration' = [ApnConfig]},
  +			SubscriptionData = #'3gpp_s6a_Subscription-Data'{
  +					'APN-Configuration-Profile' = [ApnProfile]},
   			{reply, #'3gpp_s6a_ULA'{'Session-Id' = SId,
  -					'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  +					'Result-Code' = [?'DIAMETER_BASE_RESULT-CODE_SUCCESS'],
   					'Auth-Session-State' =  ?'3GPP_S6A_AUTH-SESSION-STATE_NO_STATE_MAINTAINED',
   					'Origin-Host' = OHost, 'Origin-Realm' = ORealm,
  -					'Subscription-Data' = SubscriptionData}};
  +					'Subscription-Data' = [SubscriptionData]}};
   		{error, not_found} ->
   			{reply, #'3gpp_s6a_AIA'{'Session-Id' = SId,
  -					'Experimental-Result' = #'3gpp_s6a_Experimental-Result'{
  +					'Experimental-Result' = [#'3gpp_s6a_Experimental-Result'{
   					'Vendor-Id' = ?IANA_PEN_3GPP,
  -					'Experimental-Result-Code' = ?'DIAMETER_ERROR_USER_UNKNOWN'},
  +					'Experimental-Result-Code' = ?'DIAMETER_ERROR_USER_UNKNOWN']},
   					'Auth-Session-State' =  ?'3GPP_S6A_AUTH-SESSION-STATE_NO_STATE_MAINTAINED',
   					'Origin-Host' = OHost, 'Origin-Realm' = ORealm}};
   		{error, Reason} ->
   			error_logger:error_report(["Service lookup failure",
   					{service, ServiceName}, {module, ?MODULE}, {error, Reason}]),
   			{reply, #'3gpp_s6a_ULA'{'Session-Id' = SId,
  -					'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY',
  +					'Result-Code' = [?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY'],
   					'Auth-Session-State' =  ?'3GPP_S6A_AUTH-SESSION-STATE_NO_STATE_MAINTAINED',
   					'Origin-Host' = OHost, 'Origin-Realm' = ORealm}}
   	end.
  
positive.code: 		#'3gpp_s6a_AIR'{'Session-Id' = SId, 'User-Name' = IMSI,
  		'Requested-EUTRAN-Authentication-Info' = ReqEutranAuth}) ->
  	case ocs:find_service(IMSI) of
  		{ok, #service{enabled = false}} ->
  			{reply, #'3gpp_s6a_AIA'{'Session-Id' = SId,
  					'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_AUTHORIZATION_REJECTED',
  					'Auth-Session-State' =  ?'3GPP_S6A_AUTH-SESSION-STATE_NO_STATE_MAINTAINED',
  					'Origin-Host' = OHost, 'Origin-Realm' = ORealm}};
  		{ok, #service{password = #aka_cred{k = K, opc = OPc, dif = DIF},
  				attributes = _Attributes}} ->
  			% @todo Handle two digit MNC!
  			<<Mcc1, Mcc2, Mcc3, Mnc1, Mnc2, Mnc3, _/binary>> = IMSI,
  			SN = <<Mcc2:4, Mcc1:4, Mnc3:4, Mcc3:4, Mnc2:4, Mnc1:4>>,
  
negative.code: 		#diameter_caps{origin_host = {OHost, _DHost},
  		origin_realm = {ORealm, _DRealm}} = Capabilities,
  		#'3gpp_s6a_AIR'{'Session-Id' = SId} = Request) ->
  	try
  		authentication_information(ServiceName, Capabilities, Request)
  	catch
  		_:_Reason ->
  			{reply, #'3gpp_s6a_AIA'{'Session-Id' = SId,
  					'Result-Code' = [?'DIAMETER_BASE_RESULT-CODE_INVALID_AVP_BITS'],
  					'Auth-Session-State' =  ?'3GPP_S6A_AUTH-SESSION-STATE_NO_STATE_MAINTAINED',
  					'Origin-Host' = OHost, 'Origin-Realm' = ORealm}}
  	end;
  