Use get_random_seed() to initialize GTP module

This commit is contained in:
Robert Schmidt
2022-12-19 15:57:10 +01:00
parent 92d5270adf
commit e99c019fb4
+5 -1
View File
@@ -19,7 +19,7 @@ extern "C" {
#include <openair2/LAYER2/PDCP_v10.1.0/pdcp.h>
#include <openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h>
#include "openair2/SDAP/nr_sdap/nr_sdap.h"
//#include <openair1/PHY/phy_extern.h>
#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<uint64_t, gtpEndPoint> instances;
gtpEndPoints() {
srandom(get_random_seed());
}
~gtpEndPoints() {
// automatically close all sockets on quit
for (const auto &p : instances)