IP Traffic not working, tun if established by NRUE
Updated the configuration files. Added a sleep to ensure that the LTE UE gets attached to the EPC before the bearer is modified to be gNB. Updated the ifconfig tunnel up command to be brought up by the NR UE socket when in NSA mode. Lastly, started the gNB PDCP layer in S1 mode.
This commit is contained in:
@@ -276,37 +276,37 @@ int esm_ebr_context_create(
|
||||
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 && "
|
||||
"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);
|
||||
|
||||
if ( res<0 ) {
|
||||
LOG_TRACE(WARNING, "ESM-PROC - Failed to system command string");
|
||||
}
|
||||
|
||||
/* 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.
|
||||
* background_system() is a replacement mechanism relying on a
|
||||
* background process that does the system() and reports result to
|
||||
* the parent process (lte-softmodem, oaisim, ...). The background
|
||||
* process is created very early in the life of the parent process.
|
||||
* The processes interact through standard pipes. See
|
||||
* common/utils/system.c for details.
|
||||
*/
|
||||
if (get_softmodem_params()->nsa == 0)
|
||||
{
|
||||
res = sprintf(command_line,
|
||||
"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);
|
||||
|
||||
if ( res<0 ) {
|
||||
LOG_TRACE(WARNING, "ESM-PROC - Failed to system command string");
|
||||
}
|
||||
|
||||
/* 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.
|
||||
* background_system() is a replacement mechanism relying on a
|
||||
* background process that does the system() and reports result to
|
||||
* the parent process (lte-softmodem, oaisim, ...). The background
|
||||
* process is created very early in the life of the parent process.
|
||||
* The processes interact through standard pipes. See
|
||||
* common/utils/system.c for details.
|
||||
*/
|
||||
|
||||
LOG_TRACE(INFO, "Melissa Elkadi ESM-PROC - executing %s ",
|
||||
command_line);
|
||||
if (background_system(command_line) != 0)
|
||||
@@ -315,6 +315,23 @@ int esm_ebr_context_create(
|
||||
}
|
||||
}
|
||||
else if (get_softmodem_params()->nsa) {
|
||||
res = sprintf(command_line,
|
||||
"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_nru" : "oip", ueid + 1,
|
||||
UE_NAS_USE_TUN ? "oaitun_nru" : "oip", ueid + 1,
|
||||
ipv4_addr, ueid + 10000,
|
||||
ipv4_addr, ueid + 10000,
|
||||
UE_NAS_USE_TUN ? "oaitun_nru" : "oip",
|
||||
ueid + 1, ueid + 10000);
|
||||
|
||||
if ( res<0 ) {
|
||||
LOG_TRACE(WARNING, "ESM-PROC - Failed to system command string");
|
||||
}
|
||||
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));
|
||||
|
||||
Reference in New Issue
Block a user