From e99c019fb4b6af5917a60034c51fcd969b11cc59 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 16 Dec 2022 16:08:15 +0100 Subject: [PATCH] Use get_random_seed() to initialize GTP module --- openair3/ocp-gtpu/gtp_itf.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 2c702fa36a..10418c996a 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -19,7 +19,7 @@ extern "C" { #include #include #include "openair2/SDAP/nr_sdap/nr_sdap.h" -//#include +#include "sim.h" #pragma pack(1) @@ -143,6 +143,10 @@ class gtpEndPoints { // the instance id will be the Linux socket handler, as this is uniq map instances; + gtpEndPoints() { + srandom(get_random_seed()); + } + ~gtpEndPoints() { // automatically close all sockets on quit for (const auto &p : instances)