Add NAS handler for Service Reject message
This commit is contained in:
@@ -151,6 +151,8 @@ static const text_info_t sa_iei_s[] = {FOREACH_SA_IEI(TO_TEXT)};
|
||||
|
||||
typedef enum { FOREACH_CAUSE(TO_ENUM) } cause_id_t;
|
||||
|
||||
static const text_info_t fgmm_cause_s[] = {FOREACH_CAUSE(TO_TEXT)};
|
||||
|
||||
/* 10.5.7.3 3GPP TS 24.008 */
|
||||
typedef struct {
|
||||
uint8_t value;
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#include "openair2/SDAP/nr_sdap/nr_sdap.h"
|
||||
#include "fgs_nas_utils.h"
|
||||
#include "fgmm_service_accept.h"
|
||||
#include "fgmm_service_reject.h"
|
||||
|
||||
#define MAX_NAS_UE 4
|
||||
|
||||
@@ -1531,6 +1532,17 @@ static void handle_service_accept(nr_ue_nas_t *nas, const byte_array_t *buffer)
|
||||
print_info(msg.cause->cause, cause_text_info, sizeofArray(cause_text_info)));
|
||||
}
|
||||
|
||||
static void handle_service_reject(nr_ue_nas_t *nas, const byte_array_t *buffer)
|
||||
{
|
||||
fgs_service_reject_msg_t msg = {0};
|
||||
decode_fgs_service_reject(&msg, buffer);
|
||||
// Extract timer t3448 in seconds (optional IE)
|
||||
nas->t3448 = process_gprs_timer(msg.t3448);
|
||||
// Extract timer t3446 in seconds (optional IE)
|
||||
nas->t3446 = process_gprs_timer(msg.t3446);
|
||||
LOG_E(NAS, "Received NAS Service Reject message with cause %s\n", fgmm_cause_s[msg.cause].text);
|
||||
}
|
||||
|
||||
void *nas_nrue(void *args_p)
|
||||
{
|
||||
// Wait for a message or an event
|
||||
@@ -1737,6 +1749,13 @@ void *nas_nrue(void *args_p)
|
||||
handle_service_accept(nas, &buffer);
|
||||
break;
|
||||
}
|
||||
|
||||
case FGS_SERVICE_REJECT: {
|
||||
byte_array_t buffer = {.buf = pdu_buffer, .len = pdu_length};
|
||||
handle_service_reject(nas, &buffer);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
LOG_W(NR_RRC, "unknown message type %d\n", msg_type);
|
||||
break;
|
||||
|
||||
@@ -100,6 +100,8 @@ typedef struct {
|
||||
int t3512;
|
||||
// Timer t3448 in seconds (-1 = disabled)
|
||||
int t3448;
|
||||
// Timer t3446 in seconds (-1 = disabled)
|
||||
int t3446;
|
||||
} nr_ue_nas_t;
|
||||
|
||||
nr_ue_nas_t *get_ue_nas_info(module_id_t module_id);
|
||||
|
||||
Reference in New Issue
Block a user