summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/include/osmocom/bb/common/Makefile.am
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2018-07-21 22:20:49 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2018-07-23 20:55:45 +0100
commit812866daab20dbb9242d7b3a7f417f6d0e1d8a0e (patch)
treee1c46e87d74000766d043e3d2b07731b8104b4d0 /src/host/layer23/include/osmocom/bb/common/Makefile.am
parentfd33dcc2023dad960157023b7d5de586612dc5f5 (diff)
Move from libc random() to osmo_get_rand_id (2nd attempt)
When starting multiple mobile in the same second, the libc random number generator will be seeded to exactly the same value. The random bits inside the RACH request(s) will be exactly the same across multiple mobile and when the channel fails they all pick the same randomized back-off timing. Use stronger random numbers and replace all calls to random(2) with osmo_get_rand_id. Add a fallback to try random(). [v2: Add helper to make sure the result is int and between 0 and RAND_MAX] Change-Id: Icdd4be88c62bba1e9d954568e48f0c12a67ac182
Diffstat (limited to 'src/host/layer23/include/osmocom/bb/common/Makefile.am')
-rw-r--r--src/host/layer23/include/osmocom/bb/common/Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/Makefile.am b/src/host/layer23/include/osmocom/bb/common/Makefile.am
index 945c73db..cd3437e3 100644
--- a/src/host/layer23/include/osmocom/bb/common/Makefile.am
+++ b/src/host/layer23/include/osmocom/bb/common/Makefile.am
@@ -1,2 +1,2 @@
noinst_HEADERS = l1ctl.h l1l2_interface.h l23_app.h logging.h \
- networks.h gps.h sysinfo.h osmocom_data.h
+ networks.h gps.h sysinfo.h osmocom_data.h utils.h