Sending tunnel interface 'up' command to NR UE
Once the LTE UE's tunnel interface with the EPC is ready to be established, if we are in NSA mode, we do not want to launch the tunnel interface from the LTE UE side, but in the NR UE. Via itti_msgs we send the string containing the tunnel interface 'up' command to the NR UE and bring it up from the NR UE.
This commit is contained in:
@@ -51,6 +51,7 @@ Description Defines functions used to handle EPS bearer contexts.
|
||||
#include "assertions.h"
|
||||
#include "pdcp.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
@@ -262,6 +263,19 @@ int esm_ebr_context_create(
|
||||
netmask = 32;
|
||||
strcpy(broadcast, ipv4_addr);
|
||||
}
|
||||
LOG_I(NAS, "Melissa Elkadi setting commandline string: "
|
||||
"ip address add %s/%d broadcast %s dev %s%d && "
|
||||
"ip link set %s%d up && "
|
||||
"ip rule add from %s/32 table %d && "
|
||||
"ip rule add to %s/32 table %d && "
|
||||
"ip route add default dev %s%d table %d",
|
||||
ipv4_addr, netmask, broadcast,
|
||||
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
|
||||
UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
|
||||
ipv4_addr, ueid + 10000,
|
||||
ipv4_addr, ueid + 10000,
|
||||
UE_NAS_USE_TUN ? "oaitun_ue" : "oip",
|
||||
ueid + 1, ueid + 10000);
|
||||
|
||||
res = sprintf(command_line,
|
||||
"ip address add %s/%d broadcast %s dev %s%d && "
|
||||
@@ -281,9 +295,6 @@ int esm_ebr_context_create(
|
||||
LOG_TRACE(WARNING, "ESM-PROC - Failed to system command string");
|
||||
}
|
||||
|
||||
LOG_TRACE(INFO, "ESM-PROC - executing %s ",
|
||||
command_line);
|
||||
|
||||
/* Calling system() here disrupts UE's realtime processing in some cases.
|
||||
* This may be because of the call to fork(), which, for some
|
||||
* unidentified reason, interacts badly with other (realtime) threads.
|
||||
@@ -294,8 +305,21 @@ int esm_ebr_context_create(
|
||||
* The processes interact through standard pipes. See
|
||||
* common/utils/system.c for details.
|
||||
*/
|
||||
if (background_system(command_line) != 0)
|
||||
LOG_TRACE(ERROR, "ESM-PROC - failed command '%s'", command_line);
|
||||
if (get_softmodem_params()->nsa == 0)
|
||||
{
|
||||
LOG_TRACE(INFO, "Melissa Elkadi ESM-PROC - executing %s ",
|
||||
command_line);
|
||||
if (background_system(command_line) != 0)
|
||||
{
|
||||
LOG_TRACE(ERROR, "ESM-PROC - failed command '%s'", command_line);
|
||||
}
|
||||
}
|
||||
else if (get_softmodem_params()->nsa) {
|
||||
LOG_I(NAS, "Melissa Elkadi, sending NAS_OAI_TUN_NSA msg to LTE UE via itti\n");
|
||||
MessageDef *msg_p = itti_alloc_new_message(TASK_NAS_UE, 0, NAS_OAI_TUN_NSA);
|
||||
memcpy(NAS_OAI_TUN_NSA(msg_p).buffer, command_line, sizeof(NAS_OAI_TUN_NSA(msg_p).buffer));
|
||||
itti_send_msg_to_task(TASK_RRC_UE, 0, msg_p);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ void *nas_ue_task(void *args_p)
|
||||
break;
|
||||
|
||||
case NAS_CONN_ESTABLI_CNF:
|
||||
LOG_I(NAS, "[UE %d] Received %s: errCode %u, length %u\n", Mod_id, ITTI_MSG_NAME (msg_p),
|
||||
LOG_I(NAS, "Melissa Elkadi [UE %d] Received %s: errCode %u, length %u\n", Mod_id, ITTI_MSG_NAME (msg_p),
|
||||
NAS_CONN_ESTABLI_CNF (msg_p).errCode, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.length);
|
||||
|
||||
if ((NAS_CONN_ESTABLI_CNF (msg_p).errCode == AS_SUCCESS)
|
||||
|
||||
Reference in New Issue
Block a user