forked from acouzens/open5gs
fix: managing multiple calls (#869)
If PCRF sends RAR, it generates different Charging-Rule-Name.
This commit is contained in:
parent
457230a2f6
commit
829123dad0
|
@ -253,14 +253,11 @@ done:
|
|||
|
||||
bson_iter_recurse(&child4_iter, &child5_iter);
|
||||
while (bson_iter_next(&child5_iter)) {
|
||||
const char *child5_key = bson_iter_key(&child5_iter);
|
||||
ogs_pcc_rule_t *pcc_rule = NULL;
|
||||
|
||||
ogs_assert(child5_key);
|
||||
pcc_rule_index = atoi(child5_key);
|
||||
ogs_assert(pcc_rule_index < OGS_MAX_NUM_OF_PCC_RULE);
|
||||
|
||||
pcc_rule = &session_data->pcc_rule[pcc_rule_index];
|
||||
|
||||
bson_iter_recurse(&child5_iter, &child6_iter);
|
||||
while (bson_iter_next(&child6_iter)) {
|
||||
const char *child6_key = bson_iter_key(&child6_iter);
|
||||
|
@ -437,15 +434,11 @@ done:
|
|||
|
||||
bson_iter_recurse(&child6_iter, &child7_iter);
|
||||
while (bson_iter_next(&child7_iter)) {
|
||||
const char *child7_key =
|
||||
bson_iter_key(&child7_iter);
|
||||
ogs_flow_t *flow = NULL;
|
||||
|
||||
ogs_assert(child7_key);
|
||||
flow_index = atoi(child7_key);
|
||||
ogs_assert(flow_index < OGS_MAX_NUM_OF_FLOW);
|
||||
|
||||
flow = &pcc_rule->flow[flow_index];
|
||||
|
||||
bson_iter_recurse(&child7_iter, &child8_iter);
|
||||
while (bson_iter_next(&child8_iter)) {
|
||||
const char *child8_key =
|
||||
|
@ -474,7 +467,7 @@ done:
|
|||
ogs_error("PCC Rule Name has already been defined");
|
||||
ogs_free(pcc_rule->name);
|
||||
}
|
||||
pcc_rule->name = ogs_msprintf("%s%d", dnn, pcc_rule_index+1);
|
||||
pcc_rule->name = ogs_msprintf("%s-g%d", dnn, pcc_rule_index+1);
|
||||
ogs_assert(pcc_rule->name);
|
||||
|
||||
/* 5GC: PCC-Rule-Id */
|
||||
|
|
|
@ -811,7 +811,8 @@ int pcrf_gx_send_rar(
|
|||
&rx_sess_data->pcc_rule[rx_sess_data->num_of_pcc_rule];
|
||||
|
||||
/* Device PCC Rule Info from DB Profile */
|
||||
pcc_rule->name = ogs_strdup(db_pcc_rule->name);
|
||||
pcc_rule->name = ogs_msprintf("%s-r%d", db_pcc_rule->name,
|
||||
(int)ogs_pool_index(&rx_sess_state_pool, rx_sess_data));
|
||||
ogs_assert(pcc_rule->name);
|
||||
|
||||
memcpy(&pcc_rule->qos, &db_pcc_rule->qos, sizeof(ogs_qos_t));
|
||||
|
@ -831,8 +832,6 @@ int pcrf_gx_send_rar(
|
|||
|
||||
rx_sess_data->num_of_pcc_rule++;
|
||||
} else {
|
||||
ogs_assert(strcmp(pcc_rule->name, db_pcc_rule->name) == 0);
|
||||
|
||||
/* Check Flow */
|
||||
count = matched_flow(pcc_rule, media_component);
|
||||
if (count == -1) {
|
||||
|
|
|
@ -133,11 +133,7 @@ void smf_bearer_binding(smf_sess_t *sess)
|
|||
if (pcc_rule->type == OGS_PCC_RULE_TYPE_INSTALL) {
|
||||
ogs_pfcp_pdr_t *dl_pdr = NULL, *ul_pdr = NULL;
|
||||
|
||||
bearer = smf_bearer_find_by_qci_arp(sess,
|
||||
pcc_rule->qos.index,
|
||||
pcc_rule->qos.arp.priority_level,
|
||||
pcc_rule->qos.arp.pre_emption_capability,
|
||||
pcc_rule->qos.arp.pre_emption_vulnerability);
|
||||
bearer = smf_bearer_find_by_pcc_rule_name(sess, pcc_rule->name);
|
||||
if (!bearer) {
|
||||
if (pcc_rule->num_of_flow == 0) {
|
||||
/* TFT is mandatory in
|
||||
|
@ -440,11 +436,7 @@ void smf_qos_flow_binding(smf_sess_t *sess, ogs_sbi_stream_t *stream)
|
|||
if (pcc_rule->type == OGS_PCC_RULE_TYPE_INSTALL) {
|
||||
ogs_pfcp_pdr_t *dl_pdr = NULL, *ul_pdr = NULL;
|
||||
|
||||
qos_flow = smf_bearer_find_by_qci_arp(sess,
|
||||
pcc_rule->qos.index,
|
||||
pcc_rule->qos.arp.priority_level,
|
||||
pcc_rule->qos.arp.pre_emption_capability,
|
||||
pcc_rule->qos.arp.pre_emption_vulnerability);
|
||||
qos_flow = smf_qos_flow_find_by_pcc_rule_id(sess, pcc_rule->id);
|
||||
if (!qos_flow) {
|
||||
if (pcc_rule->num_of_flow == 0) {
|
||||
/* TFT is mandatory in
|
||||
|
@ -488,6 +480,8 @@ void smf_qos_flow_binding(smf_sess_t *sess, ogs_sbi_stream_t *stream)
|
|||
qos_flow_created = 1;
|
||||
|
||||
} else {
|
||||
ogs_fatal("Update QoS Flow: Not implemented in 5G Core");
|
||||
ogs_assert_if_reached();
|
||||
ogs_assert(strcmp(qos_flow->pcc_rule.id, pcc_rule->id) == 0);
|
||||
|
||||
if (pcc_rule->num_of_flow) {
|
||||
|
|
|
@ -2039,44 +2039,6 @@ smf_bearer_t *smf_bearer_find_by_pcc_rule_name(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
smf_bearer_t *smf_bearer_find_by_qci_arp(smf_sess_t *sess,
|
||||
uint8_t qos_index,
|
||||
uint8_t priority_level,
|
||||
uint8_t pre_emption_capability,
|
||||
uint8_t pre_emption_vulnerability)
|
||||
{
|
||||
smf_bearer_t *bearer = NULL;
|
||||
|
||||
ogs_assert(sess);
|
||||
|
||||
bearer = smf_default_bearer_in_sess(sess);
|
||||
if (!bearer) return NULL;
|
||||
|
||||
if (sess->session.qos.index == qos_index &&
|
||||
sess->session.qos.arp.priority_level == priority_level &&
|
||||
sess->session.qos.arp.pre_emption_capability ==
|
||||
pre_emption_capability &&
|
||||
sess->session.qos.arp.pre_emption_vulnerability ==
|
||||
pre_emption_vulnerability) {
|
||||
return bearer;
|
||||
}
|
||||
|
||||
bearer = smf_bearer_next(bearer);
|
||||
while (bearer) {
|
||||
if (bearer->qos.index == qos_index &&
|
||||
bearer->qos.arp.priority_level == priority_level &&
|
||||
bearer->qos.arp.pre_emption_capability ==
|
||||
pre_emption_capability &&
|
||||
bearer->qos.arp.pre_emption_vulnerability ==
|
||||
pre_emption_vulnerability) {
|
||||
return bearer;
|
||||
}
|
||||
bearer = smf_bearer_next(bearer);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
smf_bearer_t *smf_bearer_find_by_pdr_id(
|
||||
smf_sess_t *sess, ogs_pfcp_pdr_id_t pdr_id)
|
||||
{
|
||||
|
|
|
@ -387,11 +387,6 @@ smf_bearer_t *smf_bearer_find_by_pgw_s5u_teid(
|
|||
smf_bearer_t *smf_bearer_find_by_ebi(smf_sess_t *sess, uint8_t ebi);
|
||||
smf_bearer_t *smf_bearer_find_by_pcc_rule_name(
|
||||
smf_sess_t *sess, char *pcc_rule_name);
|
||||
smf_bearer_t *smf_bearer_find_by_qci_arp(smf_sess_t *sess,
|
||||
uint8_t qos_index,
|
||||
uint8_t priority_level,
|
||||
uint8_t pre_emption_capability,
|
||||
uint8_t pre_emption_vulnerability);
|
||||
smf_bearer_t *smf_bearer_find_by_pdr_id(
|
||||
smf_sess_t *sess, ogs_pfcp_pdr_id_t pdr_id);
|
||||
smf_bearer_t *smf_default_bearer_in_sess(smf_sess_t *sess);
|
||||
|
|
|
@ -195,13 +195,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
|
|
@ -440,6 +440,86 @@ void pcscf_rx_send_aar_audio(uint8_t **rx_sid,
|
|||
ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
|
||||
ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1);
|
||||
ogs_assert(ret == 0);
|
||||
} else if (flow_type == 2) {
|
||||
/* Set Media-Sub-Component #1 */
|
||||
ret = fd_msg_avp_new(ogs_diam_rx_media_sub_component, 0, &avpch1);
|
||||
|
||||
ret = fd_msg_avp_new(ogs_diam_rx_flow_number, 0, &avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
val.i32 = 1;
|
||||
ret = fd_msg_avp_setvalue (avpch2, &val);
|
||||
ogs_assert(ret == 0);
|
||||
ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
|
||||
ret = fd_msg_avp_new(ogs_diam_rx_flow_description, 0, &avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
#define TEST_OGS_DIAM_RX_FLOW_DESC17 \
|
||||
"permit out 17 from 172.20.166.84 to 10.45.0.2 30001"
|
||||
val.os.data = (uint8_t *)TEST_OGS_DIAM_RX_FLOW_DESC17;
|
||||
val.os.len = strlen(TEST_OGS_DIAM_RX_FLOW_DESC17);
|
||||
ret = fd_msg_avp_setvalue (avpch2, &val);
|
||||
ogs_assert(ret == 0);
|
||||
ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
|
||||
ret = fd_msg_avp_new(ogs_diam_rx_flow_description, 0, &avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
#define TEST_OGS_DIAM_RX_FLOW_DESC18 \
|
||||
"permit in 17 from 10.45.0.2 to 172.20.166.84 30360"
|
||||
val.os.data = (uint8_t *)TEST_OGS_DIAM_RX_FLOW_DESC18;
|
||||
val.os.len = strlen(TEST_OGS_DIAM_RX_FLOW_DESC18);
|
||||
ret = fd_msg_avp_setvalue (avpch2, &val);
|
||||
ogs_assert(ret == 0);
|
||||
ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
|
||||
ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1);
|
||||
ogs_assert(ret == 0);
|
||||
|
||||
/* Set Media-Sub-Component #2 */
|
||||
ret = fd_msg_avp_new(ogs_diam_rx_media_sub_component, 0, &avpch1);
|
||||
|
||||
ret = fd_msg_avp_new(ogs_diam_rx_flow_number, 0, &avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
val.i32 = 2;
|
||||
ret = fd_msg_avp_setvalue (avpch2, &val);
|
||||
ogs_assert(ret == 0);
|
||||
ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
|
||||
ret = fd_msg_avp_new(ogs_diam_rx_flow_usage, 0, &avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
val.i32 = OGS_DIAM_RX_FLOW_USAGE_RTCP;
|
||||
ret = fd_msg_avp_setvalue (avpch2, &val);
|
||||
ogs_assert(ret == 0);
|
||||
ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
|
||||
ret = fd_msg_avp_new(ogs_diam_rx_flow_description, 0, &avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
#define TEST_OGS_DIAM_RX_FLOW_DESC19 \
|
||||
"permit out 17 from 172.20.166.84 to 10.45.0.2 30002"
|
||||
val.os.data = (uint8_t *)TEST_OGS_DIAM_RX_FLOW_DESC19;
|
||||
val.os.len = strlen(TEST_OGS_DIAM_RX_FLOW_DESC19);
|
||||
ret = fd_msg_avp_setvalue (avpch2, &val);
|
||||
ogs_assert(ret == 0);
|
||||
ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
|
||||
ret = fd_msg_avp_new(ogs_diam_rx_flow_description, 0, &avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
#define TEST_OGS_DIAM_RX_FLOW_DESC20 \
|
||||
"permit in 17 from 10.45.0.2 to 172.20.166.84 30361"
|
||||
val.os.data = (uint8_t *)TEST_OGS_DIAM_RX_FLOW_DESC20;
|
||||
val.os.len = strlen(TEST_OGS_DIAM_RX_FLOW_DESC20);
|
||||
ret = fd_msg_avp_setvalue (avpch2, &val);
|
||||
ogs_assert(ret == 0);
|
||||
ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2);
|
||||
ogs_assert(ret == 0);
|
||||
|
||||
ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1);
|
||||
ogs_assert(ret == 0);
|
||||
} else {
|
||||
|
|
|
@ -227,13 +227,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -263,13 +266,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_audio(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI, 1, 1);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -301,13 +307,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_audio(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI, 2, 1);
|
||||
|
||||
/* Receive E-RAB Modify Request +
|
||||
/* Receive E-RABModifyRequest +
|
||||
* Modify EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABModify,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Modify Response */
|
||||
/* Send E-RABModifyResponse */
|
||||
sendbuf = test_s1ap_build_e_rab_modify_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
|
@ -360,11 +369,14 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Modify Request +
|
||||
/* Receive E-RABModifyRequest +
|
||||
* Modify EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABModify,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send Modify EPS bearer context accept */
|
||||
esmbuf = testesm_build_modify_eps_bearer_context_accept(bearer);
|
||||
|
@ -374,7 +386,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send E-RAB Modify Response */
|
||||
/* Send E-RABModifyResponse */
|
||||
sendbuf = test_s1ap_build_e_rab_modify_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
|
@ -390,13 +402,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Modify Request +
|
||||
/* Receive DownlinkNASTransport +
|
||||
* Modify EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_downlinkNASTransport,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Modify Response */
|
||||
/* Send E-RABModifyResponse */
|
||||
sendbuf = test_s1ap_build_e_rab_modify_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
|
@ -421,13 +436,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Modify Request +
|
||||
/* Receive DownlinkNASTransport +
|
||||
* Modify EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_downlinkNASTransport,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Modify Response */
|
||||
/* Send E-RABModifyResponse */
|
||||
sendbuf = test_s1ap_build_e_rab_modify_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
|
@ -444,13 +462,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send Session-Termination-Request */
|
||||
pcscf_rx_send_str(rx_sid);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
|
@ -711,13 +732,16 @@ static void test2_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -734,13 +758,16 @@ static void test2_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -763,20 +790,25 @@ static void test2_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_audio(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI, 0, 1);
|
||||
|
||||
/* Receive downlink NAS transport +
|
||||
* Modify EPS bearer context request */
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Modify Response */
|
||||
sendbuf = test_s1ap_build_e_rab_modify_response(bearer);
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 8);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Modify EPS bearer context accept */
|
||||
esmbuf = testesm_build_modify_eps_bearer_context_accept(bearer);
|
||||
/* Send Activate dedicated EPS bearer context accept */
|
||||
esmbuf = testesm_build_activate_dedicated_eps_bearer_context_accept(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
|
@ -792,13 +824,16 @@ static void test2_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Deactivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -1056,13 +1091,16 @@ static void test3_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -1113,11 +1151,14 @@ static void test3_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Deactivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send PDN Connectivity Request */
|
||||
sess = test_sess_add_by_apn(test_ue, "ims");
|
||||
|
@ -1135,13 +1176,16 @@ static void test3_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -1423,13 +1467,16 @@ static void test4_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -1459,13 +1506,16 @@ static void test4_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Deactivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 5);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -1500,13 +1550,16 @@ static void test4_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -1532,13 +1585,16 @@ static void test4_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_audio(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI, 1, 1);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 8);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -1559,13 +1615,16 @@ static void test4_func(abts_case *tc, void *data)
|
|||
|
||||
pcscf_rx_send_str(rx_sid);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
|
@ -1935,13 +1994,16 @@ static void test5_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -2014,13 +2076,16 @@ static void test5_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -2095,13 +2160,16 @@ static void test5_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Modify Request +
|
||||
/* Receive E-RABModifyRequest +
|
||||
* Modify EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABModify,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Modify Response */
|
||||
/* Send E-RABModifyResponse */
|
||||
sendbuf = test_s1ap_build_e_rab_modify_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
|
@ -2163,13 +2231,16 @@ static void test5_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
|
@ -2220,6 +2291,430 @@ static void test5_func(abts_case *tc, void *data)
|
|||
test_ue_remove(test_ue);
|
||||
}
|
||||
|
||||
static void test6_func(abts_case *tc, void *data)
|
||||
{
|
||||
int rv;
|
||||
ogs_socknode_t *s1ap;
|
||||
ogs_socknode_t *gtpu;
|
||||
ogs_pkbuf_t *emmbuf;
|
||||
ogs_pkbuf_t *esmbuf;
|
||||
ogs_pkbuf_t *sendbuf;
|
||||
ogs_pkbuf_t *recvbuf;
|
||||
ogs_s1ap_message_t message;
|
||||
|
||||
uint8_t *rx_sid1 = NULL;
|
||||
uint8_t *rx_sid2 = NULL;
|
||||
|
||||
ogs_nas_5gs_mobile_identity_suci_t mobile_identity_suci;
|
||||
test_ue_t *test_ue = NULL;
|
||||
test_sess_t *sess = NULL;
|
||||
test_bearer_t *bearer = NULL;
|
||||
|
||||
uint32_t enb_ue_s1ap_id;
|
||||
uint64_t mme_ue_s1ap_id;
|
||||
|
||||
bson_t *doc = NULL;
|
||||
|
||||
/* Setup Test UE & Session Context */
|
||||
memset(&mobile_identity_suci, 0, sizeof(mobile_identity_suci));
|
||||
|
||||
mobile_identity_suci.h.supi_format = OGS_NAS_5GS_SUPI_FORMAT_IMSI;
|
||||
mobile_identity_suci.h.type = OGS_NAS_5GS_MOBILE_IDENTITY_SUCI;
|
||||
mobile_identity_suci.routing_indicator1 = 0;
|
||||
mobile_identity_suci.routing_indicator2 = 0xf;
|
||||
mobile_identity_suci.routing_indicator3 = 0xf;
|
||||
mobile_identity_suci.routing_indicator4 = 0xf;
|
||||
mobile_identity_suci.protection_scheme_id = OGS_NAS_5GS_NULL_SCHEME;
|
||||
mobile_identity_suci.home_network_pki_value = 0;
|
||||
mobile_identity_suci.scheme_output[0] = 0x10;
|
||||
mobile_identity_suci.scheme_output[1] = 0x32;
|
||||
mobile_identity_suci.scheme_output[2] = 0x54;
|
||||
mobile_identity_suci.scheme_output[3] = 0x86;
|
||||
mobile_identity_suci.scheme_output[4] = 0x91;
|
||||
|
||||
test_ue = test_ue_add_by_suci(&mobile_identity_suci, 13);
|
||||
ogs_assert(test_ue);
|
||||
|
||||
test_ue->e_cgi.cell_id = 0x1079baf;
|
||||
test_ue->nas.ksi = 0;
|
||||
test_ue->nas.value = OGS_NAS_ATTACH_TYPE_COMBINED_EPS_IMSI_ATTACH;
|
||||
|
||||
test_ue->k_string = "465b5ce8b199b49faa5f0a2ee238a6bc";
|
||||
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
|
||||
|
||||
sess = test_sess_add_by_apn(test_ue, "internet");
|
||||
ogs_assert(sess);
|
||||
|
||||
/* eNB connects to MME */
|
||||
s1ap = tests1ap_client(AF_INET);
|
||||
ABTS_PTR_NOTNULL(tc, s1ap);
|
||||
|
||||
/* eNB connects to SGW */
|
||||
gtpu = test_gtpu_server(1, AF_INET);
|
||||
ABTS_PTR_NOTNULL(tc, gtpu);
|
||||
|
||||
/* Send S1-Setup Reqeust */
|
||||
sendbuf = test_s1ap_build_s1_setup_request(
|
||||
S1AP_ENB_ID_PR_macroENB_ID, 0x54f64);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive S1-Setup Response */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(NULL, recvbuf);
|
||||
|
||||
/********** Insert Subscriber in Database */
|
||||
doc = test_db_new_ims(test_ue);
|
||||
ABTS_PTR_NOTNULL(tc, doc);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, test_db_insert_ue(test_ue, doc));
|
||||
|
||||
/* Send Attach Request */
|
||||
memset(&sess->pdn_connectivity_param,
|
||||
0, sizeof(sess->pdn_connectivity_param));
|
||||
sess->pdn_connectivity_param.eit = 1;
|
||||
esmbuf = testesm_build_pdn_connectivity_request(sess);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
|
||||
memset(&test_ue->attach_request_param,
|
||||
0, sizeof(test_ue->attach_request_param));
|
||||
test_ue->attach_request_param.integrity_protected = 1;
|
||||
test_ue->attach_request_param.drx_parameter = 1;
|
||||
test_ue->attach_request_param.ms_network_capability = 1;
|
||||
test_ue->attach_request_param.tmsi_status = 1;
|
||||
test_ue->attach_request_param.mobile_station_classmark_2 = 1;
|
||||
test_ue->attach_request_param.ue_usage_setting = 1;
|
||||
emmbuf = testemm_build_attach_request(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, emmbuf);
|
||||
|
||||
memset(&test_ue->initial_ue_param, 0, sizeof(test_ue->initial_ue_param));
|
||||
sendbuf = test_s1ap_build_initial_ue_message(
|
||||
test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Signalling, false);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Authentication Request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
|
||||
/* Send Authentication response */
|
||||
emmbuf = testemm_build_authentication_response(test_ue);
|
||||
ABTS_PTR_NOTNULL(tc, emmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Security mode Command */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
|
||||
/* Send Security mode complete */
|
||||
test_ue->mobile_identity_imeisv_presence = true;
|
||||
emmbuf = testemm_build_security_mode_complete(test_ue);
|
||||
ABTS_PTR_NOTNULL(tc, emmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive ESM Information Request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
|
||||
/* Send ESM Information Response */
|
||||
sess->esm_information_param.pco = 1;
|
||||
esmbuf = testesm_build_esm_information_response(sess);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive Initial Context Setup Request +
|
||||
* Attach Accept +
|
||||
* Activate Default Bearer Context Request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
|
||||
/* Send UE Capability Info Indication */
|
||||
sendbuf = tests1ap_build_ue_radio_capability_info_indication(test_ue);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Initial Context Setup Response */
|
||||
sendbuf = test_s1ap_build_initial_context_setup_response(test_ue);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Attach Complete + Activate default EPS bearer cotext accept */
|
||||
test_ue->nr_cgi.cell_id = 0x1234502;
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 5);
|
||||
ogs_assert(bearer);
|
||||
esmbuf = testesm_build_activate_default_eps_bearer_context_accept(
|
||||
bearer, false);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
emmbuf = testemm_build_attach_complete(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, emmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive EMM information */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
|
||||
/* Send GTP-U ICMP Packet */
|
||||
rv = test_gtpu_send_ping(gtpu, bearer, TEST_PING_IPV4);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive GTP-U ICMP Packet */
|
||||
recvbuf = test_gtpu_read(gtpu);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send PDN Connectivity Request */
|
||||
sess = test_sess_add_by_apn(test_ue, "ims");
|
||||
ogs_assert(sess);
|
||||
sess->pti = 5;
|
||||
|
||||
sess->pdn_connectivity_param.integrity_protected = 1;
|
||||
sess->pdn_connectivity_param.ciphered = 1;
|
||||
sess->pdn_connectivity_param.apn = 1;
|
||||
sess->pdn_connectivity_param.pco = 1;
|
||||
esmbuf = testesm_build_pdn_connectivity_request(sess);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Activate default EPS bearer context accept */
|
||||
esmbuf = testesm_build_activate_default_eps_bearer_context_accept(
|
||||
bearer, true);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send GTP-U ICMP Packet */
|
||||
rv = test_gtpu_send_ping(gtpu, bearer, TEST_PING_IPV4);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive GTP-U ICMP Packet */
|
||||
recvbuf = test_gtpu_read(gtpu);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send AA-Request */
|
||||
pcscf_rx_send_aar_audio(&rx_sid1, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI, 1, 1);
|
||||
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Activate dedicated EPS bearer context accept */
|
||||
esmbuf = testesm_build_activate_dedicated_eps_bearer_context_accept(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* DELAY is needed in dedicated EPS bearer */
|
||||
ogs_msleep(100);
|
||||
|
||||
/* Send GTP-U ICMP Packet */
|
||||
rv = test_gtpu_send_ping(gtpu, bearer, TEST_PING_IPV4);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive GTP-U ICMP Packet */
|
||||
recvbuf = test_gtpu_read(gtpu);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Send AA-Request */
|
||||
pcscf_rx_send_aar_audio(&rx_sid2, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI, 1, 2);
|
||||
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 8);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Activate dedicated EPS bearer context accept */
|
||||
esmbuf = testesm_build_activate_dedicated_eps_bearer_context_accept(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Session-Termination-Request */
|
||||
pcscf_rx_send_str(rx_sid1);
|
||||
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Deactivate EPS bearer context accept */
|
||||
esmbuf = testesm_build_deactivate_eps_bearer_context_accept(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Test Bearer Remove */
|
||||
test_bearer_remove(bearer);
|
||||
|
||||
/* Send Session-Termination-Request */
|
||||
pcscf_rx_send_str(rx_sid2);
|
||||
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 8);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send Deactivate EPS bearer context accept */
|
||||
esmbuf = testesm_build_deactivate_eps_bearer_context_accept(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, esmbuf);
|
||||
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Test Bearer Remove */
|
||||
test_bearer_remove(bearer);
|
||||
|
||||
/* Send Detach Request */
|
||||
emmbuf = testemm_build_detach_request(test_ue, 1);
|
||||
ABTS_PTR_NOTNULL(tc, emmbuf);
|
||||
sendbuf = test_s1ap_build_initial_ue_message(
|
||||
test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Signalling, true);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive OLD UE Context Release Command */
|
||||
enb_ue_s1ap_id = test_ue->enb_ue_s1ap_id;
|
||||
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
|
||||
/* Send OLD UE Context Release Complete */
|
||||
sendbuf = test_s1ap_build_ue_context_release_complete(test_ue);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
test_ue->enb_ue_s1ap_id = enb_ue_s1ap_id;
|
||||
|
||||
/* Receive UE Context Release Command */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
|
||||
/* Send UE Context Release Complete */
|
||||
sendbuf = test_s1ap_build_ue_context_release_complete(test_ue);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
ogs_msleep(300);
|
||||
|
||||
/********** Remove Subscriber in Database */
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, test_db_remove_ue(test_ue));
|
||||
|
||||
/* eNB disonncect from MME */
|
||||
testenb_s1ap_close(s1ap);
|
||||
|
||||
/* eNB disonncect from SGW */
|
||||
test_gtpu_close(gtpu);
|
||||
|
||||
test_ue_remove(test_ue);
|
||||
}
|
||||
|
||||
abts_suite *test_rx(abts_suite *suite)
|
||||
{
|
||||
suite = ADD_SUITE(suite)
|
||||
|
@ -2229,6 +2724,7 @@ abts_suite *test_rx(abts_suite *suite)
|
|||
abts_run_test(suite, test3_func, NULL);
|
||||
abts_run_test(suite, test4_func, NULL);
|
||||
abts_run_test(suite, test5_func, NULL);
|
||||
abts_run_test(suite, test6_func, NULL);
|
||||
|
||||
return suite;
|
||||
}
|
||||
|
|
|
@ -212,13 +212,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -235,11 +238,14 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send Activate dedicated EPS bearer context accept */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
|
@ -251,7 +257,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
ABTS_PTR_NOTNULL(tc, sendbuf);
|
||||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
|
@ -278,13 +284,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Deactivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
|
|
@ -225,13 +225,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate default EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 6);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -262,19 +265,25 @@ static void test1_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_video(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -290,7 +299,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 8);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -344,13 +353,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -377,13 +389,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send Session-Termination-Request */
|
||||
pcscf_rx_send_str(rx_sid);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 8);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -412,19 +427,25 @@ static void test1_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_video(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 9);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -440,7 +461,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 10);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -494,13 +515,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 9);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -527,13 +551,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send Session-Termination-Request */
|
||||
pcscf_rx_send_str(rx_sid);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 10);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -562,19 +589,25 @@ static void test1_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_video(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 11);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -590,7 +623,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 12);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -644,13 +677,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 11);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -677,13 +713,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send Session-Termination-Request */
|
||||
pcscf_rx_send_str(rx_sid);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 12);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -712,19 +751,25 @@ static void test1_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_video(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 13);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -740,7 +785,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 14);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -794,13 +839,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 13);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -827,13 +875,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send Session-Termination-Request */
|
||||
pcscf_rx_send_str(rx_sid);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 14);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -862,19 +913,25 @@ static void test1_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_video(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 15);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -890,7 +947,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -944,13 +1001,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 15);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -977,13 +1037,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send Session-Termination-Request */
|
||||
pcscf_rx_send_str(rx_sid);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 7);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -1012,19 +1075,25 @@ static void test1_func(abts_case *tc, void *data)
|
|||
pcscf_rx_send_aar_video(&rx_sid, sess,
|
||||
OGS_DIAM_RX_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Receive E-RAB Setup Request +
|
||||
/* Receive E-RABSetupRequest +
|
||||
* Activate dedicated EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABSetup,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 8);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -1040,7 +1109,7 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Send E-RAB Setup Response */
|
||||
/* Send E-RABSetupResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 9);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_setup_response(bearer);
|
||||
|
@ -1094,13 +1163,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testenb_s1ap_send(s1ap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 8);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
@ -1127,13 +1199,16 @@ static void test1_func(abts_case *tc, void *data)
|
|||
/* Send Session-Termination-Request */
|
||||
pcscf_rx_send_str(rx_sid);
|
||||
|
||||
/* Receive E-RAB Release Command +
|
||||
/* Receive E-RABReleaseCommand +
|
||||
* Dectivate EPS bearer context request */
|
||||
recvbuf = testenb_s1ap_read(s1ap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
tests1ap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
S1AP_ProcedureCode_id_E_RABRelease,
|
||||
test_ue->s1ap_procedure_code);
|
||||
|
||||
/* Send E-RAB Release Response */
|
||||
/* Send E-RABReleaseResponse */
|
||||
bearer = test_bearer_find_by_ue_ebi(test_ue, 9);
|
||||
ogs_assert(bearer);
|
||||
sendbuf = test_s1ap_build_e_rab_release_response(bearer);
|
||||
|
|
|
@ -245,10 +245,15 @@ static void test1_func(abts_case *tc, void *data)
|
|||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive PDU session modification command */
|
||||
/* Receive PDUSessionResourceModifyRequest +
|
||||
* DL NAS transport +
|
||||
* PDU session modification command */
|
||||
recvbuf = testgnb_ngap_read(ngap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
testngap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
NGAP_ProcedureCode_id_PDUSessionResourceModify,
|
||||
test_ue->ngap_procedure_code);
|
||||
|
||||
/* Send PDU session resource modify response */
|
||||
qos_flow = test_qos_flow_find_by_qfi(sess, 2);
|
||||
|
|
|
@ -278,10 +278,15 @@ static void test1_func(abts_case *tc, void *data)
|
|||
rv = testgnb_ngap_send(ngap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive PDU session modification command */
|
||||
/* Receive PDUSessionResourceModifyRequest +
|
||||
* DL NAS transport +
|
||||
* PDU session modification command */
|
||||
recvbuf = testgnb_ngap_read(ngap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
testngap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
NGAP_ProcedureCode_id_PDUSessionResourceModify,
|
||||
test_ue->ngap_procedure_code);
|
||||
|
||||
/* Send PDU session resource modify response */
|
||||
qos_flow = test_qos_flow_find_by_qfi(sess, 2);
|
||||
|
@ -750,10 +755,15 @@ static void test2_func(abts_case *tc, void *data)
|
|||
rv = testgnb_ngap_send(ngap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive PDU session modification command */
|
||||
/* Receive PDUSessionResourceModifyRequest +
|
||||
* DL NAS transport +
|
||||
* PDU session modification command */
|
||||
recvbuf = testgnb_ngap_read(ngap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
testngap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
NGAP_ProcedureCode_id_PDUSessionResourceModify,
|
||||
test_ue->ngap_procedure_code);
|
||||
|
||||
/* Send PDU session resource modify response */
|
||||
qos_flow = test_qos_flow_find_by_qfi(sess, 2);
|
||||
|
@ -1178,10 +1188,15 @@ static void test3_func(abts_case *tc, void *data)
|
|||
rv = testgnb_ngap_send(ngap, sendbuf);
|
||||
ABTS_INT_EQUAL(tc, OGS_OK, rv);
|
||||
|
||||
/* Receive PDU session modification command */
|
||||
/* Receive PDUSessionResourceModifyRequest +
|
||||
* DL NAS transport +
|
||||
* PDU session modification command */
|
||||
recvbuf = testgnb_ngap_read(ngap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
testngap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
NGAP_ProcedureCode_id_PDUSessionResourceModify,
|
||||
test_ue->ngap_procedure_code);
|
||||
|
||||
/* Send PDU session resource modify response */
|
||||
qos_flow = test_qos_flow_find_by_qfi(sess, 2);
|
||||
|
@ -1595,10 +1610,15 @@ static void test4_func(abts_case *tc, void *data)
|
|||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
ogs_pkbuf_free(recvbuf);
|
||||
|
||||
/* Receive PDU session modification command */
|
||||
/* Receive PDUSessionResourceModifyRequest +
|
||||
* DL NAS transport +
|
||||
* PDU session modification command */
|
||||
recvbuf = testgnb_ngap_read(ngap);
|
||||
ABTS_PTR_NOTNULL(tc, recvbuf);
|
||||
testngap_recv(test_ue, recvbuf);
|
||||
ABTS_INT_EQUAL(tc,
|
||||
NGAP_ProcedureCode_id_PDUSessionResourceModify,
|
||||
test_ue->ngap_procedure_code);
|
||||
|
||||
/* Send PDU session resource modify response */
|
||||
qos_flow2 = test_qos_flow_find_by_qfi(sess6, 2);
|
||||
|
|
Loading…
Reference in New Issue