From 537d480f3947924a2db182bab36a48f0bb42045f Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Mon, 12 Oct 2015 19:36:35 +0200 Subject: 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. --- openbsc/include/openbsc/gb_proxy.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/gb_proxy.h b/openbsc/include/openbsc/gb_proxy.h index 74dc6d44e..ff35a398b 100644 --- a/openbsc/include/openbsc/gb_proxy.h +++ b/openbsc/include/openbsc/gb_proxy.h @@ -101,10 +101,6 @@ struct gbproxy_config { /* IMSI checking/matching */ struct gbproxy_match matches[GBPROX_MATCH_LAST]; - - /* Used to generate identifiers */ - unsigned bss_ptmsi_state; - unsigned sgsn_tlli_state; }; struct gbproxy_patch_state { -- cgit v1.2.3