diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-10-12 09:55:59 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-10-12 09:55:59 +0200 |
commit | fa07b489dc3e14579b34365c0a0f1b5d5a70138f (patch) | |
tree | 54777bffa73a3ac73333598ac4ac4ce1bfe01d18 /openbsc/src/gprs | |
parent | f3316e30d61603d55ed43906aaacb28e970989dc (diff) |
Revert "gprs: Use RAND_bytes for p-tmsi"
The commit not compiling/linking should have been a strong
indicator that it has not been tested either.
This reverts commit 6cf0249dacc4ae46eb0857c007906c9a3f128a3e.
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r-- | openbsc/src/gprs/Makefile.am | 3 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_sgsn.c | 6 |
2 files changed, 2 insertions, 7 deletions
diff --git a/openbsc/src/gprs/Makefile.am b/openbsc/src/gprs/Makefile.am index dcc6842d9..f46a40254 100644 --- a/openbsc/src/gprs/Makefile.am +++ b/openbsc/src/gprs/Makefile.am @@ -30,5 +30,4 @@ osmo_sgsn_SOURCES = gprs_gmm.c gprs_sgsn.c gprs_sndcp.c gprs_sndcp_vty.c \ gsm_04_08_gprs.c sgsn_cdr.c sgsn_ares.c osmo_sgsn_LDADD = \ $(top_builddir)/src/libcommon/libcommon.a \ - -lgtp $(OSMO_LIBS) $(LIBOSMOABIS_LIBS) $(LIBCARES_LIBS) \ - $(LIBCRYPTO_LIBS) -lrt + -lgtp $(OSMO_LIBS) $(LIBOSMOABIS_LIBS) $(LIBCARES_LIBS) -lrt diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 9b11c3510..f40de0b3c 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -41,8 +41,6 @@ #include <time.h> -#include <openssl/rand.h> - #define GPRS_LLME_CHECK_TICK 30 extern struct sgsn_instance *sgsn; @@ -527,9 +525,7 @@ uint32_t sgsn_alloc_ptmsi(void) int max_retries = 100; restart: - if (RAND_bytes((uint8_t *) &ptmsi, sizeof(ptmsi)) != 1) - goto failed; - + ptmsi = rand(); /* Enforce that the 2 MSB are set without loosing the distance between * identical values. Since rand() has no duplicate values within a * period (because the size of the state is the same like the size of |