[MME] incorrect behavior of the SGsAP

1. According to ETSI TS 129 118 4.1, if the Network Access Mode (NAM) is set
   to "Packet only," no SGs association should be established.

2. If the NAM is set to "Packet and Circuit," and the SGs association is
   rejected by the CS core, this rejection should only impact
   the SGs association itself and not result in a UE attach rejection
   for a UE with a valid HSS account.
This commit is contained in:
Sukchan Lee 2024-03-24 20:30:04 +09:00
parent 7c14073533
commit 390a9dd637
5 changed files with 93 additions and 15 deletions

View File

@ -334,7 +334,7 @@ Change back to the srsRAN source directory and copy the main config example as w
```bash
$ cp srsenb/enb.conf.example srsenb/enb.conf
$ cp srsenb/rr.conf.example srsenb/rr.conf
$ cp srsenb/drb.conf.example srsenb/drb.conf
$ cp srsenb/rb.conf.example srsenb/rb.conf
$ cp srsenb/sib.conf.example srsenb/sib.conf
```

View File

@ -236,13 +236,17 @@ int esm_handle_information_response(mme_sess_t *sess,
mme_csmap_t *csmap = mme_csmap_find_by_tai(&mme_ue->tai);
mme_ue->csmap = csmap;
if (csmap) {
ogs_assert(OGS_OK ==
sgsap_send_location_update_request(mme_ue));
} else {
if (!csmap ||
mme_ue->network_access_mode ==
OGS_NETWORK_ACCESS_MODE_ONLY_PACKET ||
mme_ue->nas_eps.attach.value ==
OGS_NAS_ATTACH_TYPE_EPS_ATTACH) {
r = nas_eps_send_attach_accept(mme_ue);
ogs_expect(r == OGS_OK);
ogs_assert(r != OGS_ERROR);
} else {
ogs_assert(OGS_OK ==
sgsap_send_location_update_request(mme_ue));
}
} else {
ogs_assert(OGS_OK ==

View File

@ -427,17 +427,20 @@ void mme_s11_handle_create_session_response(
mme_csmap_t *csmap = mme_csmap_find_by_tai(&mme_ue->tai);
mme_ue->csmap = csmap;
if (csmap) {
ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(
session->paa.session_type));
ogs_assert(OGS_OK ==
sgsap_send_location_update_request(mme_ue));
} else {
if (!csmap ||
mme_ue->network_access_mode ==
OGS_NETWORK_ACCESS_MODE_ONLY_PACKET ||
mme_ue->nas_eps.attach.value ==
OGS_NAS_ATTACH_TYPE_EPS_ATTACH) {
ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(
session->paa.session_type));
r = nas_eps_send_attach_accept(mme_ue);
ogs_expect(r == OGS_OK);
ogs_assert(r != OGS_ERROR);
} else {
ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(
session->paa.session_type));
ogs_assert(OGS_OK == sgsap_send_location_update_request(mme_ue));
}
} else if (create_action == OGS_GTP_CREATE_IN_TRACKING_AREA_UPDATE) {

View File

@ -210,11 +210,9 @@ void sgsap_handle_location_update_reject(mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf)
ogs_plmn_id_hexdump(&lai->nas_plmn_id), lai->lac);
}
r = nas_eps_send_attach_reject(mme_ue->enb_ue, mme_ue,
emm_cause, OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
r = nas_eps_send_attach_accept(mme_ue);
ogs_expect(r == OGS_OK);
ogs_assert(r != OGS_ERROR);
mme_send_delete_session_or_mme_ue_context_release(mme_ue);
return;

View File

@ -470,11 +470,84 @@ static void test2_func(abts_case *tc, void *data)
rv = testvlr_sgsap_send(sgsap, sendbuf);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
/* Receive Attach Reject */
/* 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 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 UE Context Release Request */
sendbuf = test_s1ap_build_ue_context_release_request(test_ue,
S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_user_inactivity);
ABTS_PTR_NOTNULL(tc, sendbuf);
rv = testenb_s1ap_send(s1ap, sendbuf);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
/* 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);
/* Send Service Request */
emmbuf = testemm_build_service_request(test_ue);
ABTS_PTR_NOTNULL(tc, emmbuf);
sendbuf = test_s1ap_build_initial_ue_message(
test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Data, true);
ABTS_PTR_NOTNULL(tc, sendbuf);
rv = testenb_s1ap_send(s1ap, sendbuf);
ABTS_INT_EQUAL(tc, OGS_OK, rv);
/* Receive Initial Context Setup Request */
recvbuf = testenb_s1ap_read(s1ap);
ABTS_PTR_NOTNULL(tc, recvbuf);
tests1ap_recv(test_ue, recvbuf);
/* 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 Detach Request */
emmbuf = testemm_build_detach_request(test_ue, 1, true, true);
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 UE Context Release Command */
recvbuf = testenb_s1ap_read(s1ap);
ABTS_PTR_NOTNULL(tc, recvbuf);