Create tun_if module for TUN interface handling
Move openair3/RRC/NAS/nas_config.c to common/utils/tun_if.c, and remove the former from all targets.
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
#include "NR_RAT-Type.h"
|
||||
#include "NR_UE-CapabilityRAT-Container.h"
|
||||
|
||||
#include "RRC/NAS/nas_config.h"
|
||||
#include "common/utils/tun_if.h"
|
||||
#if ENABLE_RAL
|
||||
#include "rrc_UE_ral.h"
|
||||
#endif
|
||||
@@ -771,7 +771,7 @@ rrc_ue_establish_drb(
|
||||
"10.0.%d.%d",
|
||||
UE_NAS_USE_TUN ? 1 : (ip_addr_offset3 + ue_mod_idP + 1),
|
||||
ip_addr_offset4 + ue_mod_idP + 1);
|
||||
oip_ifup = nas_config(ip_addr_offset3 + ue_mod_idP + 1, ip, NULL, "oaitun_oip");
|
||||
oip_ifup = tun_config(ip_addr_offset3 + ue_mod_idP + 1, ip, NULL, "oaitun_oip");
|
||||
|
||||
if (oip_ifup == 0 && (!UE_NAS_USE_TUN)) { // interface is up --> send a config the DRB
|
||||
LOG_I(OIP,"[UE %d] Config the ue net interface %d to send/receive pkt on DRB %ld to/from the protocol stack\n",
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
#include "T.h"
|
||||
#include "LTE_MeasResults.h"
|
||||
|
||||
#include "RRC/NAS/nas_config.h"
|
||||
#include "common/utils/tun_if.h"
|
||||
|
||||
#include "rrc_eNB_S1AP.h"
|
||||
#include "rrc_eNB_GTPV1U.h"
|
||||
@@ -5257,7 +5257,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
ctxt_pP->module_id);
|
||||
char ip[20];
|
||||
snprintf(ip, sizeof(ip), "10.0.%d.%d", ctxt_pP->module_id + 1, ctxt_pP->module_id + 1);
|
||||
oip_ifup = nas_config(ctxt_pP->module_id, ip, NULL, "oaitun_oai");
|
||||
oip_ifup = tun_config(ctxt_pP->module_id, ip, NULL, "oaitun_oai");
|
||||
|
||||
if (oip_ifup == 0) { // interface is up --> send a config the DRB
|
||||
module_id_t ue_module_id;
|
||||
|
||||
Reference in New Issue
Block a user