Commit d4d5fafb authored by matzakos's avatar matzakos

Enable IP TUN interface configuration upon reception of PDU Session...

Enable IP TUN interface configuration upon reception of PDU Session Establishment Accept NAS message

-User plane traffic validation with OAI UE and OAI CN:

-Downlink ping initiated from the CN is received at the IP interface of the UE. However it seems that there is some packet corruption preventing the generaration of ping reply.

-Uplink ping initiated from the UE reaches the OAI CN machine. However no ping reply is seen yet either.
parent 373d2f3f
......@@ -459,7 +459,8 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
int rb_id;
int i;
if(IS_SOFTMODEM_NOS1){
if(UE_NAS_USE_TUN){
LOG_D(PDCP, "IP packet received, to be sent to UE TUN interface");
len = write(nas_sock_fd[0], buf, size);
if (len != size) {
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
......
......@@ -38,7 +38,8 @@
#include "aka_functions.h"
#include "secu_defs.h"
#include "PduSessionEstablishRequest.h"
# include "intertask_interface.h"
#include "intertask_interface.h"
#include "openair2/RRC/NAS/nas_config.h"
/*char netName[] = "5G:mnc093.mcc208.3gppnetwork.org";
char imsi[] = "2089300007487";
......@@ -57,6 +58,7 @@ const uint8_t opc[16] = {0xc4, 0x24, 0x49, 0x36, 0x3b, 0xba, 0xd0, 0x2b, 0x66, 0
uint8_t *registration_request_buf;
uint32_t registration_request_len;
extern char *baseNetAddress;
static int nas_protected_security_header_encode(
char *buffer,
......@@ -816,6 +818,16 @@ void *nas_nrue_task(void *args_p)
LOG_I(NAS, "Send NAS_UPLINK_DATA_REQ message(PduSessionEstablishRequest)\n");
}
}
else if((pdu_buffer + 16) != NULL){
msg_type = *(pdu_buffer + 16);
if(msg_type == FGS_PDU_SESSION_ESTABLISHMENT_ACC){
sprintf(baseNetAddress, "%d.%d", *(pdu_buffer + 39),*(pdu_buffer + 40));
int third_octet = *(pdu_buffer + 41);
int fourth_octet = *(pdu_buffer + 42);
LOG_I(NAS, "Received PDU Session Establishment Accept\n");
nas_config(1,third_octet,fourth_octet,"ue");
}
}
break;
}
......
......@@ -59,6 +59,7 @@
// message type for 5GS session management
#define FGS_PDU_SESSION_ESTABLISHMENT_REQ 0b11000001 /* 193= 0xc1 */
#define FGS_PDU_SESSION_ESTABLISHMENT_ACC 0b11000010 /* 194= 0xc2 */
#define INITIAL_REGISTRATION 0b001
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment