aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/sgsn_main.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-07-05 15:19:12 +0200
committerHarald Welte <laforge@gnumonks.org>2016-07-16 21:03:30 +0000
commit4011e728d22a9affbe41fb2bfc8e69c14bd706ab (patch)
treeb0d6d66b7511cbd52a8204bb19535732e14f2d65 /openbsc/src/gprs/sgsn_main.c
parent9759374adbb632ff5f8a4b739e0f62a9c9017622 (diff)
SGSN: use unique AUTH REQ reference
The A&C reference number specified in 3GPP TS 24.008 ยง 10.5.5.19 identifies particular request sent by network with the related response sent by MS. The value transparently copied from request to response by MS: the spec do not specify what exactly should be in there so we use rand() to decrease chance for collisions. Note: variable named 'rand' clashes with standard function rand() so it was renamed. Change-Id: I3638821a9b4a0532b28dbbb50faa30c4082579f6 Related: OS#1582
Diffstat (limited to 'openbsc/src/gprs/sgsn_main.c')
-rw-r--r--openbsc/src/gprs/sgsn_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
index c852840db..44751363c 100644
--- a/openbsc/src/gprs/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <stdio.h>
+#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
@@ -306,6 +307,7 @@ int main(int argc, char **argv)
struct gsm_network dummy_network;
int rc;
+ srand(time(NULL));
tall_bsc_ctx = talloc_named_const(NULL, 0, "osmo_sgsn");
tall_msgb_ctx = talloc_named_const(tall_bsc_ctx, 0, "msgb");