laforge has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/43096?usp=email )
Change subject: translate AUTS field in UTRAN as well as E-UTRAN requests ......................................................................
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(-)
Approvals: lynxis lazus: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
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