Jacob Erlbeck d8a65536ec sgsn: Fix P-TMSI generator's distance of equal values
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
2015-01-20 16:13:01 +01:00
2011-02-05 20:26:25 +01:00

The file is empty.
Description
Osmocom Media Gateway (RTP proxy and RTP/E1 gateway)
Readme 25 MiB
Languages
C 95.1%
Python 1.6%
Makefile 1.2%
M4 1%
Shell 1%