mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
d8a65536ecc6eae026898822b58f520f5ee25ac7
Currently sgsn_alloc_ptmsi uses rand() to get a new P-TMSI and then sets to upper 2 MSB. Therefore there is no lower limit of the distance between 2 identical P-TMSI. This patch changes the implementation to discard any random value above 2^30 and to generate a new random number in that case until a fitting number is found (or a repetition limit is reached). This way, all number below 2^30 within the PRNG's period are used. Ticket: OW#1362 Sponsored-by: On-Waves ehf
The file is empty.
Description
Languages
C
95.1%
Python
1.6%
Makefile
1.2%
M4
1%
Shell
1%