Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqn should be mandatory for uac object or set to 0 per default causing issues when not set on AIR #204

Open
killdashnine opened this issue Aug 21, 2024 · 0 comments

Comments

@killdashnine
Copy link

killdashnine commented Aug 21, 2024

When creating a uac object via the API, 'sqn' is not mandatory, resulting in a 'null' value in the database if ommitted:

image

Subsequently when getting AIR comes in, the following exception occurs as there is no 'None' check before casting:

[08/21/2024 18:00:16] [ERROR] Traceback (most recent call last):
File "/pyhss/lib/diameter.py", line 1818, in Answer_16777251_318
vector_dict = self.database.Get_Vectors_AuC(subscriber_details['auc_id'], "air", plmn=plmn)
File "/pyhss/lib/database.py", line 1572, in Get_Vectors_AuC
rand, xres, autn, kasme = S6a_crypt.generate_eutran_vector(key_data['ki'], key_data['opc'], key_data['amf'], key_data['sqn'], kwargs['plmn'])
File "/pyhss/lib/S6a_crypt.py", line 37, in generate_eutran_vector
sqn = int(sqn)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

I'd also expect an error response on the AIR when the TypeError is thrown but there is no response to the diameter request seen.

Alternative would be to do a 'null' check before casting to int.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant