diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2015-10-12 19:36:35 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-10-13 10:20:26 +0200 |
commit | 537d480f3947924a2db182bab36a48f0bb42045f (patch) | |
tree | be417e6b0bc6096a53090f3aa5f738a06b36b397 /openbsc/tests/gbproxy/Makefile.am | |
parent | d1554ecb78ebf5b13ec72cdf1faf1bbd88121a01 (diff) |
gprs/gb_proxy: Use RAND_bytes for gbproxy TLLI/TMSI allocation
This change has some implications for the test case. It manipulated
bss_ptmsi_state and sgsn_tlli_state variables to make the output of
rand_r() and thus the TLLI/TMSI used predictable.
This possibility is gone when using RAND_bytes() so instead it is
overridden by a function that returns a deterministic sequence of values
(0x00dead00, 0x00dead01, ...). The test cases are adapted to expect
these values instead of the pseudo random values before.
The gbproxy_test stdout file changes as well, but only where the
TLLI/TMSI is displayed (in the hex dumps as well as the TLLI cache
entries). All other output is the same.
Diffstat (limited to 'openbsc/tests/gbproxy/Makefile.am')
-rw-r--r-- | openbsc/tests/gbproxy/Makefile.am | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/tests/gbproxy/Makefile.am b/openbsc/tests/gbproxy/Makefile.am index 4577e3aa8..18d77a848 100644 --- a/openbsc/tests/gbproxy/Makefile.am +++ b/openbsc/tests/gbproxy/Makefile.am @@ -7,6 +7,8 @@ EXTRA_DIST = gbproxy_test.ok noinst_PROGRAMS = gbproxy_test gbproxy_test_SOURCES = gbproxy_test.c +gbproxy_test_LDFLAGS = \ + -Wl,--wrap=RAND_bytes gbproxy_test_LDADD = \ $(top_builddir)/src/gprs/gb_proxy.o \ $(top_builddir)/src/gprs/gb_proxy_patch.o \ @@ -22,4 +24,4 @@ gbproxy_test_LDADD = \ $(LIBOSMOCORE_LIBS) $(LIBOSMOGB_LIBS) \ $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ $(LIBOSMOABIS_LIBS) $(LIBRARY_DL) \ - -lrt + $(LIBCRYPTO_LIBS) -lrt |