mirror of https://gerrit.osmocom.org/pysim
utils.py: Bugfix for parsing non-programmed EFePDGSelection
Change-Id: I3a16af785d8ae9ea8730771367bba2d50690b414
This commit is contained in:
parent
5e67d5b80a
commit
3a261d31d5
|
@ -651,6 +651,7 @@ def dec_ePDGSelection(sixhexbytes):
|
|||
def format_ePDGSelection(hexstr):
|
||||
ePDGSelection_info_tag_chars = 2
|
||||
ePDGSelection_info_tag_str = hexstr[:2]
|
||||
s = ""
|
||||
# Minimum length
|
||||
len_chars = 2
|
||||
# TODO: Need to determine length properly - definite length support only
|
||||
|
@ -659,6 +660,11 @@ def format_ePDGSelection(hexstr):
|
|||
# But, each PLMN entry is made of PLMN (3 Bytes) + ePDG Priority (2 Bytes) + ePDG FQDN format (1 Byte)
|
||||
# Totalling to 6 Bytes, maybe length should be 6n
|
||||
len_str = hexstr[ePDGSelection_info_tag_chars:ePDGSelection_info_tag_chars+len_chars]
|
||||
|
||||
# Not programmed scenario
|
||||
if int(len_str, 16) == 255 or int(ePDGSelection_info_tag_str, 16) == 255:
|
||||
len_chars = 0
|
||||
ePDGSelection_info_tag_chars = 0
|
||||
if len_str[0] == '8':
|
||||
# The bits 7 to 1 denotes the number of length octets if length > 127
|
||||
if int(len_str[1]) > 0:
|
||||
|
@ -669,7 +675,6 @@ def format_ePDGSelection(hexstr):
|
|||
content_str = hexstr[ePDGSelection_info_tag_chars+len_chars:]
|
||||
# Right pad to prevent index out of range - multiple of 6 bytes
|
||||
content_str = rpad(content_str, len(content_str) + (12 - (len(content_str) % 12)))
|
||||
s = ""
|
||||
for rec_data in hexstr_to_Nbytearr(content_str, 6):
|
||||
rec_info = dec_ePDGSelection(rec_data)
|
||||
if rec_info['mcc'] == 0xFFF and rec_info['mnc'] == 0xFFF:
|
||||
|
|
|
@ -108,7 +108,7 @@ EHPLMN:
|
|||
ffffff # unused
|
||||
ffffff # unused
|
||||
|
||||
USIM Service Table: beff9f9de73e0408400170730000002e00000000
|
||||
USIM Service Table: beff9f9de73e0408400170330006002e00000000
|
||||
Service 2 - Fixed Dialling Numbers (FDN)
|
||||
Service 3 - Extension 2
|
||||
Service 4 - Service Dialling Numbers (SDN)
|
||||
|
@ -156,7 +156,8 @@ USIM Service Table: beff9f9de73e0408400170730000002e00000000
|
|||
Service 90 - Operator CSG Lists and corresponding indications
|
||||
Service 93 - Communication Control for IMS by USIM
|
||||
Service 94 - Extended Terminal Applications
|
||||
Service 95 - Support of UICC access to IMS
|
||||
Service 106 - ePDG configuration Information support
|
||||
Service 107 - ePDG configuration Information configured
|
||||
Service 122 - 5GS Mobility Management Information
|
||||
Service 123 - 5G Security Parameters
|
||||
Service 124 - Subscription identifier privacy support
|
||||
|
|
Loading…
Reference in New Issue