This is a follow-up to the discussion from #262 (which I've updated to not change Get_Vectors_AuC).
Two things are unexpected in the SQN increase logic in Get_Vectors_AuC in lib/database.py:
-
SQN gets increased with += 100. It looks like this just happens to work (or may desynchronize clients UEs often?), but the correct way according to 3GPP TS 33.102 § C.1.1.1 would be only increasing the SEQ part of SQN = SEQ | IND . (FWIW OsmoHLR assigns one IND to each client that connects by its name: https://gerrit.osmocom.org/c/osmo-hlr/+/16764)
-
Loops with while kwargs['requested_vectors'] != 0: run S6a_crypt.generate_maa_vector or generate_eap_aka_vector once and then return the same vector (without increasing SQN!) multiple times in return vector_list.
(Fixing 2. should be trivial and could be done together with 1. in the same PR IMHO.)
This is a follow-up to the discussion from #262 (which I've updated to not change
Get_Vectors_AuC).Two things are unexpected in the SQN increase logic in
Get_Vectors_AuCinlib/database.py:SQNgets increased with+= 100. It looks like this just happens to work (or may desynchronize clients UEs often?), but the correct way according to 3GPP TS 33.102 § C.1.1.1 would be only increasing theSEQpart ofSQN = SEQ | IND. (FWIW OsmoHLR assigns oneINDto each client that connects by its name: https://gerrit.osmocom.org/c/osmo-hlr/+/16764)Loops with
while kwargs['requested_vectors'] != 0:runS6a_crypt.generate_maa_vectororgenerate_eap_aka_vectoronce and then return the same vector (without increasingSQN!) multiple times inreturn vector_list.(Fixing 2. should be trivial and could be done together with 1. in the same PR IMHO.)