Attention is currently required from: laforge.
Hoernchen has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/43171?usp=email )
Change subject: tlv: preserve the comprehension bit ......................................................................
Patch Set 1:
(1 comment)
File src/osmocom/tlv.py:
https://gerrit.osmocom.org/c/python/pyosmocom/+/43171/comment/97067343_d68b9... : PS1, Line 638: if x.tag > 0xff: : # two byte tag: the comprehension bit is 0x8000! : if x.tag & 0x8000 == 0: : print("Fixing up COMPR_TLV_IE class %s: tag=0x%x has no comprehension bit" % (name, x.tag)) : x.tag = x.tag | 0x8000
what exactly is the difference here? isn't this change semantically identical?
No, because the original condition was AND, so if either part didnt match it would fall through to the elif and that is what clobbered the two byte tag. As the comment says two byte is 0x8000 - precisely the part in the previous AND that would fail.