laforge submitted this change.

View Change

Approvals: lynxis lazus: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
translate AUTS field in UTRAN as well as E-UTRAN requests

Change-Id: Ie3ecfc668cff50ebdbc190e8384e891e05e7ad27
---
M src/server_cb.erl
1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/src/server_cb.erl b/src/server_cb.erl
index 1606085..851f396 100644
--- a/src/server_cb.erl
+++ b/src/server_cb.erl
@@ -265,16 +265,25 @@
% construct GSUP request to HLR and transceive it
GsupTx1 = #{message_type => send_auth_info_req, imsi => list_to_binary(UserName),
supported_rat_types => [rat_eutran_sgs], current_rat_type => rat_eutran_sgs},
- ResyncInfo = req_resynchronization_info(ReqEU),
- case ResyncInfo of
+ ResyncInfoEU = req_resynchronization_info(ReqEU),
+ ResyncInfoUG = req_resynchronization_info(ReqUG),
+ case ResyncInfoEU of
false ->
GsupTx2 = #{};
- ValidResyncInfo ->
- lager:info("ResyncInfo is valid ~p", [ResyncInfo]),
- GsupTx2 = #{rand => binary:part(ValidResyncInfo, 0, 16),
- auts => binary:part(ValidResyncInfo, 16, 14)}
+ ValidResyncInfoEU ->
+ lager:info("ResyncInfo is valid ~p", [ResyncInfoEU]),
+ GsupTx2 = #{rand => binary:part(ValidResyncInfoEU, 0, 16),
+ auts => binary:part(ValidResyncInfoEU, 16, 14)}
end,
- GsupTx = maps:merge(GsupTx1, GsupTx2),
+ case ResyncInfoUG of
+ false ->
+ GsupTx3 = #{};
+ ValidResyncInfoUG ->
+ lager:info("ResyncInfo is valid ~p", [ResyncInfoUG]),
+ GsupTx3 = #{rand => binary:part(ValidResyncInfoUG, 0, 16),
+ auts => binary:part(ValidResyncInfoUG, 16, 14)}
+ end,
+ GsupTx = maps:merge(GsupTx1, maps:merge(GsupTx2, GsupTx3)),
GsupRx = gen_server:call(gsup_client, {transceive_gsup, GsupTx, send_auth_info_res, send_auth_info_err}),
lager:info("GsupRx: ~p~n", [GsupRx]),
% construct DIAMETER AIA response

To view, visit change 43096. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: Ie3ecfc668cff50ebdbc190e8384e891e05e7ad27
Gerrit-Change-Number: 43096
Gerrit-PatchSet: 2
Gerrit-Owner: theenbyperor <q@magicalcodewit.ch>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>