mirror of https://gerrit.osmocom.org/pysim
utils: tolerate uninitialized fields in dec_addr_tlv
TLV fields holding an address may still be uninitialized and hence filled with 0xff bytes. Lets interpret those fields in the same way as we interpret empty fields. Related: OS#6094 Change-Id: Idc0a92ea88756266381c8da2ad62de061a8ea7a1
This commit is contained in:
parent
784b947b11
commit
1f46f07e3c
|
@ -771,6 +771,10 @@ def dec_addr_tlv(hexstr):
|
|||
if tlv[1] == 0:
|
||||
continue
|
||||
|
||||
# Uninitialized field
|
||||
if all([v == 0xff for v in tlv[2]]):
|
||||
continue
|
||||
|
||||
# First byte in the value has the address type
|
||||
addr_type = tlv[2][0]
|
||||
# TODO: Support parsing of IPv6
|
||||
|
|
Loading…
Reference in New Issue