Fix handling of Re-Synchronization-Info AVP in AIR
Below is an example of a decoded Requested-EUTRAN-Authentication-Info: [{ 'Requested-EUTRAN-Authentication-Info', [1], %% Number-Of-Requested-Vectors [1], %% Immediate-Response-Preferred [[ %% Re-Synchronization-Info 154,153,78,226,63,248,178,208,169,186,215,18,159,150,252, 103,249,220,169,90,223,249,219,26,172,118,171,193,216,221 ]], [] %% AVP }] As can be seen, the value of Re-Synchronization-Info is not a binary, but a list, so indeed is_binary(ReSyncInfo) would yeild false. Use is_list() instead and convert to binary using list_to_binary(). Change-Id: Ie5eded2f5fb2de01f69d2a9c0e5d70283bf5cbf5 Related: OS#5646
This commit is contained in:
parent
6e28afb504
commit
704230eebd
|
@ -189,10 +189,10 @@ handle_request(#diameter_packet{msg = Req, errors = []}, _SvcName, {_, Caps}) wh
|
|||
GsupTx1 = #{message_type => send_auth_info_req, imsi => list_to_binary(UserName),
|
||||
supported_rat_types => [rat_eutran_sgs], current_rat_type => rat_eutran_sgs},
|
||||
case ReqEU of
|
||||
#'Requested-EUTRAN-Authentication-Info'{'Re-Synchronization-Info' = ReSyncInfo}
|
||||
when is_binary(ReSyncInfo) ->
|
||||
GsupTx2 = #{rand => string:substr(ReSyncInfo, 1, 16),
|
||||
auts => string:substr(ReSyncInfo, 17)};
|
||||
#'Requested-EUTRAN-Authentication-Info'{'Re-Synchronization-Info' = [ReSyncInfo]}
|
||||
when is_list(ReSyncInfo) ->
|
||||
<<Rand:16/binary, Auts:14/binary>> = list_to_binary(ReSyncInfo),
|
||||
GsupTx2 = #{rand => Rand, auts => Auts};
|
||||
_ ->
|
||||
GsupTx2 = #{}
|
||||
end,
|
||||
|
|
Loading…
Reference in New Issue