We truncated the diff of some files because they were too big.
If you want to see the full diff for every file, click here.
Changes of Revision 592
open5gs_2.7.0.76.3f097.202402022026.dsc -> open5gs_2.7.0.81.8762.202402032026.dsc
Changed
x
1
2
Source: open5gs
3
Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
4
Architecture: any
5
-Version: 2.7.0.76.3f097.202402022026
6
+Version: 2.7.0.81.8762.202402032026
7
Maintainer: Harald Welte <laforge@gnumonks.org>
8
Uploaders: Sukchan Lee <acetcom@gmail.com>
9
Homepage: https://open5gs.org
10
11
open5gs-udr deb net optional arch=any
12
open5gs-upf deb net optional arch=any
13
Checksums-Sha1:
14
- ee16bc298f945d19f18dabe150e9dabdc8bfcd0e 14473172 open5gs_2.7.0.76.3f097.202402022026.tar.xz
15
+ 62dc8a18d5165e05e2134fb176eb6de128efb433 14472348 open5gs_2.7.0.81.8762.202402032026.tar.xz
16
Checksums-Sha256:
17
- dac8de23cf5f28159e8261849909fe469cf3b786f99acd207a1ad11bc19a464e 14473172 open5gs_2.7.0.76.3f097.202402022026.tar.xz
18
+ 79fe728cca3b14534cd31b51e651fdab031d5a0241059593cf530163185f4fc1 14472348 open5gs_2.7.0.81.8762.202402032026.tar.xz
19
Files:
20
- e5499cb34c2e60aa1b7fe3eb77d0eef2 14473172 open5gs_2.7.0.76.3f097.202402022026.tar.xz
21
+ f2eb025aaefa491d833406fc1c9ba67b 14472348 open5gs_2.7.0.81.8762.202402032026.tar.xz
22
open5gs_2.7.0.76.3f097.202402022026.tar.xz/.tarball-version -> open5gs_2.7.0.81.8762.202402032026.tar.xz/.tarball-version
Changed
4
1
2
-2.7.0.76-3f097.202402022026
3
+2.7.0.81-8762.202402032026
4
open5gs_2.7.0.76.3f097.202402022026.tar.xz/debian/changelog -> open5gs_2.7.0.81.8762.202402032026.tar.xz/debian/changelog
Changed
12
1
2
-open5gs (2.7.0.76.3f097.202402022026) unstable; urgency=medium
3
+open5gs (2.7.0.81.8762.202402032026) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom nightly feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Fri, 02 Feb 2024 20:27:38 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Sat, 03 Feb 2024 20:27:34 +0000
9
10
open5gs (2.7.0) unstable; urgency=medium
11
12
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/crypt/ogs-kdf.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/crypt/ogs-kdf.c
Changed
11
1
2
* TS33.401 Annex I Hash Functions
3
* Use the KDF given in TS33.220
4
*/
5
-void ogs_kdf_hash_mme(const uint8_t *message, uint8_t message_len, uint8_t *hash_mme)
6
+void ogs_kdf_hash_mme(
7
+ const uint8_t *message, uint32_t message_len, uint8_t *hash_mme)
8
{
9
uint8_t key32;
10
uint8_t outputOGS_SHA256_DIGEST_SIZE;
11
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/crypt/ogs-kdf.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/crypt/ogs-kdf.h
Changed
11
1
2
* TS33.401 Annex I Hash Functions
3
* Use the KDF given in TS33.220
4
*/
5
-void ogs_kdf_hash_mme(const uint8_t *message, uint8_t message_len, uint8_t *hash_mme);
6
+void ogs_kdf_hash_mme(
7
+ const uint8_t *message, uint32_t message_len, uint8_t *hash_mme);
8
9
/*
10
* TS33.102
11
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/decoder.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/decoder.c
Changed
46
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.2.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-04 20:50:00.889117 by acetcom
6
+ * Created on: 2024-01-21 18:47:47.827076 by acetcom
7
* from 24501-h90.docx
8
******************************************************************************/
9
10
11
12
ogs_assert(pkbuf);
13
ogs_assert(pkbuf->data);
14
- ogs_assert(pkbuf->len);
15
-
16
- memset(message, 0, sizeof(ogs_nas_5gs_message_t));
17
18
size = sizeof(ogs_nas_5gmm_header_t);
19
if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
20
ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size);
21
return OGS_ERROR;
22
}
23
+
24
+ memset(message, 0, sizeof(ogs_nas_5gs_message_t));
25
memcpy(&message->gmm.h, pkbuf->data - size, size);
26
decoded += size;
27
28
29
30
ogs_assert(pkbuf);
31
ogs_assert(pkbuf->data);
32
- ogs_assert(pkbuf->len);
33
-
34
- memset(message, 0, sizeof(ogs_nas_5gs_message_t));
35
36
size = sizeof(ogs_nas_5gsm_header_t);
37
if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
38
ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size);
39
return OGS_ERROR;
40
}
41
+
42
+ memset(message, 0, sizeof(ogs_nas_5gs_message_t));
43
memcpy(&message->gsm.h, pkbuf->data - size, size);
44
decoded += size;
45
46
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/encoder.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/encoder.c
Changed
10
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.2.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-04 20:50:00.898995 by acetcom
6
+ * Created on: 2024-01-21 18:47:47.837341 by acetcom
7
* from 24501-h90.docx
8
******************************************************************************/
9
10
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/ies.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/ies.c
Changed
10
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.2.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-04 20:50:00.874596 by acetcom
6
+ * Created on: 2024-01-21 18:47:47.812038 by acetcom
7
* from 24501-h90.docx
8
******************************************************************************/
9
10
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/ies.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/ies.h
Changed
10
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.2.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-04 20:50:00.872007 by acetcom
6
+ * Created on: 2024-01-21 18:47:47.809393 by acetcom
7
* from 24501-h90.docx
8
******************************************************************************/
9
10
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/message.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/message.h
Changed
10
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.2.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-04 20:50:00.882958 by acetcom
6
+ * Created on: 2024-01-21 18:47:47.820801 by acetcom
7
* from 24501-h90.docx
8
******************************************************************************/
9
10
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/5gs/support/nas-message.py -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/5gs/support/nas-message.py
Changed
37
1
2
3
ogs_assert(pkbuf);
4
ogs_assert(pkbuf->data);
5
- ogs_assert(pkbuf->len);
6
-
7
- memset(message, 0, sizeof(ogs_nas_5gs_message_t));
8
9
size = sizeof(ogs_nas_5gmm_header_t);
10
if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
11
ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size);
12
return OGS_ERROR;
13
}
14
+
15
+ memset(message, 0, sizeof(ogs_nas_5gs_message_t));
16
memcpy(&message->gmm.h, pkbuf->data - size, size);
17
decoded += size;
18
19
20
21
ogs_assert(pkbuf);
22
ogs_assert(pkbuf->data);
23
- ogs_assert(pkbuf->len);
24
-
25
- memset(message, 0, sizeof(ogs_nas_5gs_message_t));
26
27
size = sizeof(ogs_nas_5gsm_header_t);
28
if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
29
ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size);
30
return OGS_ERROR;
31
}
32
+
33
+ memset(message, 0, sizeof(ogs_nas_5gs_message_t));
34
memcpy(&message->gsm.h, pkbuf->data - size, size);
35
decoded += size;
36
37
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/decoder.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/decoder.c
Changed
46
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.1.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-02 22:57:51.860294 by acetcom
6
+ * Created on: 2024-01-21 18:50:03.417367 by acetcom
7
* from 24301-h90.docx
8
******************************************************************************/
9
10
11
12
ogs_assert(pkbuf);
13
ogs_assert(pkbuf->data);
14
- ogs_assert(pkbuf->len);
15
-
16
- memset(message, 0, sizeof(ogs_nas_eps_message_t));
17
18
size = sizeof(ogs_nas_emm_header_t);
19
if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
20
ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size);
21
return OGS_ERROR;
22
}
23
+
24
+ memset(message, 0, sizeof(ogs_nas_eps_message_t));
25
memcpy(&message->emm.h, pkbuf->data - size, size);
26
decoded += size;
27
28
29
30
ogs_assert(pkbuf);
31
ogs_assert(pkbuf->data);
32
- ogs_assert(pkbuf->len);
33
-
34
- memset(message, 0, sizeof(ogs_nas_eps_message_t));
35
36
size = sizeof(ogs_nas_esm_header_t);
37
if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
38
ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size);
39
return OGS_ERROR;
40
}
41
+
42
+ memset(message, 0, sizeof(ogs_nas_eps_message_t));
43
memcpy(&message->esm.h, pkbuf->data - size, size);
44
decoded += size;
45
46
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/encoder.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/encoder.c
Changed
10
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.1.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-02 22:57:51.871237 by acetcom
6
+ * Created on: 2024-01-21 18:50:03.428897 by acetcom
7
* from 24301-h90.docx
8
******************************************************************************/
9
10
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/ies.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/ies.c
Changed
10
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.1.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-02 22:57:51.846548 by acetcom
6
+ * Created on: 2024-01-21 18:50:03.402793 by acetcom
7
* from 24301-h90.docx
8
******************************************************************************/
9
10
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/ies.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/ies.h
Changed
10
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.1.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-02 22:57:51.844510 by acetcom
6
+ * Created on: 2024-01-21 18:50:03.400537 by acetcom
7
* from 24301-h90.docx
8
******************************************************************************/
9
10
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/message.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/message.h
Changed
10
1
2
/*******************************************************************************
3
* This file had been created by nas-message.py script v0.1.0
4
* Please do not modify this file but regenerate it via script.
5
- * Created on: 2023-03-02 22:57:51.852650 by acetcom
6
+ * Created on: 2024-01-21 18:50:03.409367 by acetcom
7
* from 24301-h90.docx
8
******************************************************************************/
9
10
open5gs_2.7.0.76.3f097.202402022026.tar.xz/lib/nas/eps/support/nas-message.py -> open5gs_2.7.0.81.8762.202402032026.tar.xz/lib/nas/eps/support/nas-message.py
Changed
37
1
2
3
ogs_assert(pkbuf);
4
ogs_assert(pkbuf->data);
5
- ogs_assert(pkbuf->len);
6
-
7
- memset(message, 0, sizeof(ogs_nas_eps_message_t));
8
9
size = sizeof(ogs_nas_emm_header_t);
10
if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
11
ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size);
12
return OGS_ERROR;
13
}
14
+
15
+ memset(message, 0, sizeof(ogs_nas_eps_message_t));
16
memcpy(&message->emm.h, pkbuf->data - size, size);
17
decoded += size;
18
19
20
21
ogs_assert(pkbuf);
22
ogs_assert(pkbuf->data);
23
- ogs_assert(pkbuf->len);
24
-
25
- memset(message, 0, sizeof(ogs_nas_eps_message_t));
26
27
size = sizeof(ogs_nas_esm_header_t);
28
if (ogs_pkbuf_pull(pkbuf, size) == NULL) {
29
ogs_error("ogs_pkbuf_pull() failed size:%d", (int)size);
30
return OGS_ERROR;
31
}
32
+
33
+ memset(message, 0, sizeof(ogs_nas_eps_message_t));
34
memcpy(&message->esm.h, pkbuf->data - size, size);
35
decoded += size;
36
37
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/amf-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/amf-sm.c
Changed
23
1
2
ogs_info("%s:%d Release SM context %d",
3
amf_ue->supi, sess->psi, sbi_message.res_status);
4
} else {
5
- ogs_error("%s HTTP response error %d",
6
- amf_ue->supi, sbi_message.res_status);
7
+ ogs_error("%s:%d HTTP response error %d",
8
+ amf_ue->supi, sess->psi, sbi_message.res_status);
9
}
10
-
11
amf_nsmf_pdusession_handle_release_sm_context(sess, state);
12
break;
13
14
15
* So, if CreateSMContext is failed,
16
* we'll clear SM_CONTEXT_REF.
17
*/
18
+ ogs_error("%s:%d create_sm_context failed() %d",
19
+ amf_ue->supi, sess->psi, sbi_message.res_status);
20
AMF_SESS_CLEAR(sess);
21
}
22
END
23
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/context.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/context.h
Changed
18
1
2
/* SMF sends the RESPONSE
3
* of POST /nsmf-pdusession/v1/sm-contexts */
4
char *sm_context_ref;
5
+ bool pdu_session_release_complete_received;
6
+ bool pdu_session_resource_release_response_received;
7
8
/* SMF sends the REQUEST
9
* of POST /namf-comm/v1/ue-contexts/{supi}/n1-n2-messages */
10
11
sbi_object = &(__sESS)->sbi; \
12
ogs_assert(sbi_object); \
13
\
14
- ogs_error("AMF_SESS_CLEAR"); \
15
if (ogs_list_count(&sbi_object->xact_list)) { \
16
ogs_error("SBI running %d", \
17
ogs_list_count(&sbi_object->xact_list)); \
18
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/gmm-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/gmm-handler.c
Changed
38
1
2
if (!sess) {
3
sess = amf_sess_add(amf_ue, *pdu_session_id);
4
ogs_assert(sess);
5
+ } else {
6
+ /*
7
+ * These are variables that should be initialized
8
+ * when a PDU session establishment message is received
9
+ * for an existing session.
10
+ *
11
+ * It should be noted that XXX_recieved, which is initialized now,
12
+ * has a different initialization location than XXX_gsm_type.
13
+ *
14
+ * XXX_received is initialized in the ESTABLISHMENT phase,
15
+ * but XXX_gsm_type is initialized in the RELEASE phase
16
+ * when a PDU session release command with a Reactivation Request
17
+ * and a PDU session release complete are sent simultaneously.
18
+ */
19
+ sess->pdu_session_resource_release_response_received = false;
20
+ sess->pdu_session_release_complete_received = false;
21
+
22
}
23
} else {
24
sess = amf_sess_find_by_psi(amf_ue, *pdu_session_id);
25
26
}
27
break;
28
case OGS_NAS_5GS_PDU_SESSION_RELEASE_COMPLETE:
29
- /* Prevent to invoke SMF for this session */
30
- CLEAR_SM_CONTEXT_REF(sess);
31
+ sess->pdu_session_release_complete_received = true;
32
+ if (sess->pdu_session_resource_release_response_received ==
33
+ true)
34
+ CLEAR_SM_CONTEXT_REF(sess);
35
break;
36
default:
37
break;
38
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/gmm-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/gmm-sm.c
Changed
37
1
2
break;
3
4
case OGS_NAS_5GS_5GMM_STATUS:
5
- ogs_warn("%s 5GMM STATUS : Cause%d", amf_ue->suci,
6
- nas_message->gmm.gmm_status.gmm_cause);
7
- OGS_FSM_TRAN(s, &gmm_state_exception);
8
+ ogs_warn("%s 5GMM STATUS : Cause%d",
9
+ amf_ue->suci, nas_message->gmm.gmm_status.gmm_cause);
10
break;
11
12
case OGS_NAS_5GS_DEREGISTRATION_REQUEST_FROM_UE:
13
14
case OGS_NAS_5GS_5GMM_STATUS:
15
ogs_warn("%s 5GMM STATUS : Cause%d",
16
amf_ue->suci, nas_message->gmm.gmm_status.gmm_cause);
17
- OGS_FSM_TRAN(s, &gmm_state_exception);
18
break;
19
20
case OGS_NAS_5GS_DEREGISTRATION_REQUEST_FROM_UE:
21
22
case OGS_NAS_5GS_5GMM_STATUS:
23
ogs_warn("%s 5GMM STATUS : Cause%d",
24
amf_ue->supi, nas_message->gmm.gmm_status.gmm_cause);
25
- OGS_FSM_TRAN(s, &gmm_state_exception);
26
break;
27
28
case OGS_NAS_5GS_DEREGISTRATION_REQUEST_FROM_UE:
29
30
case OGS_NAS_5GS_5GMM_STATUS:
31
ogs_warn("%s 5GMM STATUS : Cause%d",
32
amf_ue->supi, nas_message->gmm.gmm_status.gmm_cause);
33
- OGS_FSM_TRAN(s, &gmm_state_exception);
34
break;
35
36
case OGS_NAS_5GS_DEREGISTRATION_REQUEST_FROM_UE:
37
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/ngap-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/ngap-handler.c
Changed
48
1
2
ogs_assert(r != OGS_ERROR);
3
4
ogs_pkbuf_free(param.n2smbuf);
5
+
6
+ sess->pdu_session_resource_release_response_received = true;
7
+ if (sess->pdu_session_release_complete_received == true)
8
+ CLEAR_SM_CONTEXT_REF(sess);
9
}
10
+
11
}
12
13
void ngap_handle_uplink_ran_configuration_transfer(
14
15
Cause->present, (int)Cause->choice.radioNetwork);
16
17
ogs_list_for_each(&amf_ue->sess_list, sess) {
18
+ if (!SESSION_CONTEXT_IN_SMF(sess)) {
19
+ ogs_error("Session Context is not in SMF %d", sess->psi);
20
+ r = ngap_send_error_indication2(source_ue,
21
+ NGAP_Cause_PR_radioNetwork,
22
+ NGAP_CauseRadioNetwork_handover_cancelled);
23
+ ogs_expect(r == OGS_OK);
24
+ ogs_assert(r != OGS_ERROR);
25
+ return;
26
+ }
27
+
28
memset(¶m, 0, sizeof(param));
29
param.hoState = OpenAPI_ho_state_CANCELLED;
30
param.ngApCause.group = Cause->present;
31
32
ogs_assert(r != OGS_ERROR);
33
34
ogs_list_for_each(&amf_ue->sess_list, sess) {
35
+ if (!SESSION_CONTEXT_IN_SMF(sess)) {
36
+ ogs_error("Session Context is not in SMF %d", sess->psi);
37
+ r = ngap_send_error_indication2(source_ue,
38
+ NGAP_Cause_PR_radioNetwork,
39
+ NGAP_CauseRadioNetwork_partial_handover);
40
+ ogs_expect(r == OGS_OK);
41
+ ogs_assert(r != OGS_ERROR);
42
+ return;
43
+ }
44
+
45
memset(¶m, 0, sizeof(param));
46
param.hoState = OpenAPI_ho_state_COMPLETED;
47
48
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/amf/nsmf-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/amf/nsmf-handler.c
Changed
34
1
2
ogs_error("%s:%d Do not remove Session due to Reactivation-requested",
3
amf_ue->supi, sess->psi);
4
5
- /* Initialize the context instead of using amf_sess_remove() */
6
-
7
+ /*
8
+ * Issue #2917
9
+ *
10
+ * These are variables that need to be initialized
11
+ * when a PDU session release command with a Reactivation Request
12
+ * and a PDU session release complete are sent at the same time.
13
+ *
14
+ * It is important to note that XXX_gsm_type, which is initialized now,
15
+ * has a different initialization location than
16
+ * pdu_session_release_complete_received/
17
+ * pdu_session_resource_release_response_received
18
+ *
19
+ * XXX_received is initialized in the ESTABLISHMENT phase,
20
+ * but XXX_gsm_type must be initialized in the RELEASE phase.
21
+ */
22
sess->old_gsm_type = 0;
23
sess->current_gsm_type = 0;
24
25
26
} else {
27
ogs_info("%s:%d Release SM Context state:%d",
28
amf_ue->supi, sess->psi, state);
29
- amf_sess_remove(sess);
30
+ AMF_SESS_CLEAR(sess);
31
}
32
33
if (state == AMF_RELEASE_SM_CONTEXT_REGISTRATION_ACCEPT) {
34
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/emm-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/emm-sm.c
Changed
45
1
2
3
case OGS_NAS_EPS_EMM_STATUS:
4
ogs_warn("EMM STATUS : IMSI%s Cause%d",
5
- mme_ue->imsi_bcd,
6
- message->emm.emm_status.emm_cause);
7
- OGS_FSM_TRAN(s, &emm_state_exception);
8
+ mme_ue->imsi_bcd, message->emm.emm_status.emm_cause);
9
break;
10
11
case OGS_NAS_EPS_DETACH_REQUEST:
12
13
break;
14
case OGS_NAS_EPS_EMM_STATUS:
15
ogs_warn("EMM STATUS : IMSI%s Cause%d",
16
- mme_ue->imsi_bcd,
17
- message->emm.emm_status.emm_cause);
18
- OGS_FSM_TRAN(s, &emm_state_exception);
19
+ mme_ue->imsi_bcd, message->emm.emm_status.emm_cause);
20
break;
21
case OGS_NAS_EPS_DETACH_REQUEST:
22
ogs_warn("%s Detach request", mme_ue->imsi_bcd);
23
24
break;
25
case OGS_NAS_EPS_EMM_STATUS:
26
ogs_warn("EMM STATUS : IMSI%s Cause%d",
27
- mme_ue->imsi_bcd,
28
- message->emm.emm_status.emm_cause);
29
- OGS_FSM_TRAN(s, &emm_state_exception);
30
+ mme_ue->imsi_bcd, message->emm.emm_status.emm_cause);
31
break;
32
case OGS_NAS_EPS_DETACH_REQUEST:
33
ogs_warn("%s Detach request", mme_ue->imsi_bcd);
34
35
36
case OGS_NAS_EPS_EMM_STATUS:
37
ogs_warn("EMM STATUS : IMSI%s Cause%d",
38
- mme_ue->imsi_bcd,
39
- message->emm.emm_status.emm_cause);
40
- OGS_FSM_TRAN(s, &emm_state_exception);
41
+ mme_ue->imsi_bcd, message->emm.emm_status.emm_cause);
42
break;
43
case OGS_NAS_EPS_DETACH_REQUEST:
44
ogs_warn("%s Detach request", mme_ue->imsi_bcd);
45
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/mme-context.h -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/mme-context.h
Changed
10
1
2
int security_context_available;
3
int mac_failed;
4
5
- bool location_updated_but_not_canceled_yet;
6
-
7
/* Security Context */
8
ogs_nas_ue_network_capability_t ue_network_capability;
9
ogs_nas_ms_network_capability_t ms_network_capability;
10
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/mme-path.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/mme-path.c
Changed
16
1
2
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
3
S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0));
4
} else {
5
- if (mme_ue->location_updated_but_not_canceled_yet == true) {
6
- mme_s6a_send_pur(mme_ue);
7
- } else {
8
- MME_UE_CHECK(OGS_LOG_WARN, mme_ue);
9
- mme_ue_remove(mme_ue);
10
- }
11
+ MME_UE_CHECK(OGS_LOG_WARN, mme_ue);
12
+ mme_ue_remove(mme_ue);
13
}
14
}
15
break;
16
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/mme-s11-handler.c
Changed
16
1
2
} else if (action == OGS_GTP_DELETE_SEND_RELEASE_WITH_UE_CONTEXT_REMOVE) {
3
if (mme_sess_count(mme_ue) == 1) /* Last Session */ {
4
if (ECM_IDLE(mme_ue)) {
5
- if (mme_ue->location_updated_but_not_canceled_yet == true) {
6
- mme_s6a_send_pur(mme_ue);
7
- } else {
8
- MME_UE_CHECK(OGS_LOG_ERROR, mme_ue);
9
- mme_ue_remove(mme_ue);
10
- }
11
+ MME_UE_CHECK(OGS_LOG_ERROR, mme_ue);
12
+ mme_ue_remove(mme_ue);
13
} else {
14
ogs_assert(mme_ue->enb_ue);
15
r = s1ap_send_ue_context_release_command(mme_ue->enb_ue,
16
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/mme-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/mme-sm.c
Changed
18
1
2
ogs_expect(r == OGS_OK);
3
ogs_assert(r != OGS_ERROR);
4
}
5
-
6
- mme_ue->location_updated_but_not_canceled_yet = true;
7
break;
8
case OGS_DIAM_S6A_CMD_CODE_PURGE_UE:
9
ogs_debug("OGS_DIAM_S6A_CMD_CODE_PURGE_UE");
10
11
break;
12
case OGS_DIAM_S6A_CMD_CODE_CANCEL_LOCATION:
13
ogs_debug("OGS_DIAM_S6A_CMD_CODE_CANCEL_LOCATION");
14
- mme_ue->location_updated_but_not_canceled_yet = false;
15
mme_s6a_handle_clr(mme_ue, s6a_message);
16
break;
17
case OGS_DIAM_S6A_CMD_CODE_INSERT_SUBSCRIBER_DATA:
18
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/nas-path.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/nas-path.c
Changed
22
1
2
int rv;
3
ogs_pkbuf_t *esmbuf = NULL;
4
5
+ ogs_assert(esm_message_container);
6
+ if (!esm_message_container->length) {
7
+ ogs_error("Invalid ESM Message Container");
8
+ return OGS_ERROR;
9
+ }
10
+
11
if (!mme_ue_cycle(mme_ue)) {
12
ogs_error("UE(mme-ue) context has already been removed");
13
return OGS_NOTFOUND;
14
}
15
16
- ogs_assert(esm_message_container);
17
- ogs_assert(esm_message_container->length);
18
-
19
/* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM.
20
* When calculating AES_CMAC, we need to use the headroom of the packet. */
21
esmbuf = ogs_pkbuf_alloc(NULL,
22
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/mme/s1ap-handler.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/mme/s1ap-handler.c
Changed
30
1
2
return;
3
}
4
5
- mme_ue = enb_ue->mme_ue;
6
-
7
ogs_info("UE Context Release Action:%d", enb_ue->ue_ctx_rel_action);
8
ogs_info(" ENB_UE_S1AP_ID%d MME_UE_S1AP_ID%d",
9
enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id);
10
+
11
+ mme_ue = mme_ue_cycle(enb_ue->mme_ue);
12
if (mme_ue) {
13
ogs_info(" IMSI%s", mme_ue->imsi_bcd);
14
15
16
return;
17
}
18
19
- if (mme_ue->location_updated_but_not_canceled_yet == true) {
20
- mme_s6a_send_pur(mme_ue);
21
- } else {
22
- MME_UE_CHECK(OGS_LOG_DEBUG, mme_ue);
23
- mme_ue_remove(mme_ue);
24
- }
25
+ MME_UE_CHECK(OGS_LOG_DEBUG, mme_ue);
26
+ mme_ue_remove(mme_ue);
27
break;
28
case S1AP_UE_CTX_REL_S1_HANDOVER_COMPLETE:
29
ogs_debug(" Action: S1 handover complete");
30
open5gs_2.7.0.76.3f097.202402022026.tar.xz/src/smf/gsm-sm.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/src/smf/gsm-sm.c
Changed
153
1
2
case SMF_EVT_5GSM_MESSAGE:
3
nas_message = e->nas.message;
4
ogs_assert(nas_message);
5
- sess = e->sess;
6
- ogs_assert(sess);
7
stream = e->h.sbi.data;
8
ogs_assert(stream);
9
smf_ue = sess->smf_ue;
10
11
sbi_message = e->h.sbi.message;
12
ogs_assert(sbi_message);
13
14
- sess = e->sess;
15
- ogs_assert(sess);
16
smf_ue = sess->smf_ue;
17
ogs_assert(smf_ue);
18
19
20
sbi_message = e->h.sbi.message;
21
ogs_assert(sbi_message);
22
23
- sess = e->sess;
24
- ogs_assert(sess);
25
smf_ue = sess->smf_ue;
26
ogs_assert(smf_ue);
27
28
29
case SMF_EVT_5GSM_MESSAGE:
30
nas_message = e->nas.message;
31
ogs_assert(nas_message);
32
- sess = e->sess;
33
- ogs_assert(sess);
34
stream = e->h.sbi.data;
35
ogs_assert(stream);
36
smf_ue = sess->smf_ue;
37
38
break;
39
40
case SMF_EVT_NGAP_MESSAGE:
41
- sess = e->sess;
42
- ogs_assert(sess);
43
stream = e->h.sbi.data;
44
ogs_assert(stream);
45
smf_ue = sess->smf_ue;
46
47
sbi_message = e->h.sbi.message;
48
ogs_assert(sbi_message);
49
50
- sess = e->sess;
51
- ogs_assert(sess);
52
smf_ue = sess->smf_ue;
53
ogs_assert(smf_ue);
54
55
56
sbi_message = e->h.sbi.message;
57
ogs_assert(sbi_message);
58
59
- sess = e->sess;
60
- ogs_assert(sess);
61
smf_ue = sess->smf_ue;
62
ogs_assert(smf_ue);
63
64
65
break;
66
67
case SMF_EVT_NGAP_MESSAGE:
68
- sess = e->sess;
69
- ogs_assert(sess);
70
stream = e->h.sbi.data;
71
ogs_assert(stream);
72
smf_ue = sess->smf_ue;
73
74
case SMF_EVT_5GSM_MESSAGE:
75
nas_message = e->nas.message;
76
ogs_assert(nas_message);
77
- sess = e->sess;
78
- ogs_assert(sess);
79
stream = e->h.sbi.data;
80
ogs_assert(stream);
81
smf_ue = sess->smf_ue;
82
83
sbi_message = e->h.sbi.message;
84
ogs_assert(sbi_message);
85
86
- sess = e->sess;
87
- ogs_assert(sess);
88
smf_ue = sess->smf_ue;
89
ogs_assert(smf_ue);
90
91
92
93
void smf_gsm_state_5gc_session_will_deregister(ogs_fsm_t *s, smf_event_t *e)
94
{
95
+ smf_sess_t *sess = NULL;
96
+
97
+ ogs_sbi_stream_t *stream = NULL;
98
+ ogs_sbi_message_t *sbi_message = NULL;
99
+
100
ogs_assert(s);
101
ogs_assert(e);
102
103
smf_sm_debug(e);
104
105
+ sess = e->sess;
106
+ ogs_assert(sess);
107
+
108
switch (e->h.id) {
109
case OGS_FSM_ENTRY_SIG:
110
break;
111
112
case OGS_FSM_EXIT_SIG:
113
break;
114
115
+ case OGS_EVENT_SBI_SERVER:
116
+ sbi_message = e->h.sbi.message;
117
+ ogs_assert(sbi_message);
118
+ stream = e->h.sbi.data;
119
+ ogs_assert(stream);
120
+
121
+ SWITCH(sbi_message->h.service.name)
122
+ CASE(OGS_SBI_SERVICE_NAME_NSMF_PDUSESSION)
123
+ SWITCH(sbi_message->h.resource.component2)
124
+ CASE(OGS_SBI_RESOURCE_NAME_RELEASE)
125
+ ogs_assert(true == ogs_sbi_send_response(
126
+ stream, OGS_SBI_HTTP_STATUS_TOO_MANY_REQUESTS));
127
+ break;
128
+ DEFAULT
129
+ ogs_error("Invalid resource name %s",
130
+ sbi_message->h.resource.component2);
131
+ ogs_assert(true ==
132
+ ogs_sbi_server_send_error(stream,
133
+ OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
134
+ "Invalid resource name %s",
135
+ sbi_message->h.resource.component2));
136
+ OGS_FSM_TRAN(s, smf_gsm_state_exception);
137
+ END
138
+ break;
139
+
140
+ DEFAULT
141
+ ogs_error("Invalid API name %s", sbi_message->h.service.name);
142
+ ogs_assert(true ==
143
+ ogs_sbi_server_send_error(stream,
144
+ OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
145
+ "Invalid API name", sbi_message->h.service.name));
146
+ OGS_FSM_TRAN(s, smf_gsm_state_exception);
147
+ END
148
+ break;
149
+
150
default:
151
ogs_error("Unknown event %s", smf_event_get_name(e));
152
break;
153
open5gs_2.7.0.76.3f097.202402022026.tar.xz/tests/attach/auth-test.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/tests/attach/auth-test.c
Changed
89
1
2
rv = testenb_s1ap_send(s1ap, sendbuf);
3
ABTS_INT_EQUAL(tc, OGS_OK, rv);
4
5
+ /*
6
+ * --- Immediately Re-attach Test ---
7
+ *
8
+ * Problems with Purge-UE-Request/Answer can occur
9
+ * in the following situations
10
+ *
11
+ * 1. Attach Request
12
+ * 2. Authentication request
13
+ * 3. Authentication reject
14
+ * 4. UEContextReleaseCommand
15
+ * 5. UEContextReleaseComplete
16
+ * 6. Purge-UE-Request
17
+ * 7. Attach Request
18
+ * 8. Purge-UE-Answer
19
+ * 9. (UE Context Remove)
20
+ *
21
+ * To resolve this issue, we have changed to delete the UE-Context
22
+ * via mme_ue_remove() immediately upon receiving UEContextReleaseComplete()
23
+ * without calling mme_s6a_send_pur().
24
+ *
25
+ * The test below was created to indicate that mme_s6a_send_pur()
26
+ * should be added in the future to take this into account.
27
+ */
28
+
29
+ /* Send Attach Request */
30
+ memset(&sess->pdn_connectivity_param,
31
+ 0, sizeof(sess->pdn_connectivity_param));
32
+ sess->pdn_connectivity_param.eit = 1;
33
+ sess->pdn_connectivity_param.pco = 1;
34
+ sess->pdn_connectivity_param.request_type =
35
+ OGS_NAS_EPS_REQUEST_TYPE_INITIAL;
36
+ esmbuf = testesm_build_pdn_connectivity_request(sess, false);
37
+ ABTS_PTR_NOTNULL(tc, esmbuf);
38
+
39
+ memset(&test_ue->attach_request_param,
40
+ 0, sizeof(test_ue->attach_request_param));
41
+ test_ue->attach_request_param.drx_parameter = 1;
42
+ test_ue->attach_request_param.tmsi_status = 1;
43
+ test_ue->attach_request_param.mobile_station_classmark_2 = 1;
44
+ test_ue->attach_request_param.additional_update_type = 1;
45
+ test_ue->attach_request_param.ue_usage_setting = 1;
46
+ emmbuf = testemm_build_attach_request(test_ue, esmbuf, false, false);
47
+ ABTS_PTR_NOTNULL(tc, emmbuf);
48
+
49
+ memset(&test_ue->initial_ue_param, 0, sizeof(test_ue->initial_ue_param));
50
+ sendbuf = test_s1ap_build_initial_ue_message(
51
+ test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Signalling, false);
52
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
53
+ rv = testenb_s1ap_send(s1ap, sendbuf);
54
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
55
+
56
+ /* Receive Authentication Request */
57
+ recvbuf = testenb_s1ap_read(s1ap);
58
+ ABTS_PTR_NOTNULL(tc, recvbuf);
59
+ tests1ap_recv(test_ue, recvbuf);
60
+
61
+ /* Send Authentication failure - MAC failure */
62
+ emmbuf = testemm_build_authentication_failure(
63
+ test_ue, OGS_NAS_EMM_CAUSE_MAC_FAILURE, 0);
64
+ ABTS_PTR_NOTNULL(tc, emmbuf);
65
+ sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
66
+ ABTS_PTR_NOTNULL(tc, sendbuf);
67
+ rv = testenb_s1ap_send(s1ap, sendbuf);
68
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
69
+
70
+ /* Receive Authentication reject */
71
+ recvbuf = testenb_s1ap_read(s1ap);
72
+ ABTS_PTR_NOTNULL(tc, recvbuf);
73
+ tests1ap_recv(test_ue, recvbuf);
74
+
75
+ /* Receive UE Context Release Command */
76
+ recvbuf = testenb_s1ap_read(s1ap);
77
+ ABTS_PTR_NOTNULL(tc, recvbuf);
78
+ tests1ap_recv(test_ue, recvbuf);
79
+
80
+ /* Send UE Context Release Complete */
81
+ sendbuf = test_s1ap_build_ue_context_release_complete(test_ue);
82
+ ABTS_PTR_NOTNULL(tc, sendbuf);
83
+ rv = testenb_s1ap_send(s1ap, sendbuf);
84
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
85
+
86
ogs_msleep(300);
87
88
/********** Remove Subscriber in Database */
89
open5gs_2.7.0.76.3f097.202402022026.tar.xz/tests/attach/emm-status-test.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/tests/attach/emm-status-test.c
Changed
109
1
2
test_sess_t *sess = NULL;
3
test_bearer_t *bearer = NULL;
4
5
+ uint32_t enb_ue_s1ap_id;
6
+ uint64_t mme_ue_s1ap_id;
7
+
8
bson_t *doc = NULL;
9
10
/* Setup Test UE & Session Context */
11
12
ogs_assert(test_ue);
13
14
test_ue->e_cgi.cell_id = 0x1079baf0;
15
- test_ue->nas.ksi = OGS_NAS_KSI_NO_KEY_IS_AVAILABLE;
16
+ test_ue->nas.ksi = 0;
17
test_ue->nas.value = OGS_NAS_ATTACH_TYPE_COMBINED_EPS_IMSI_ATTACH;
18
19
test_ue->k_string = "465b5ce8b199b49faa5f0a2ee238a6bc";
20
21
ABTS_INT_EQUAL(tc, OGS_OK, test_db_insert_ue(test_ue, doc));
22
23
/* Send Attach Request */
24
- sess->pdn_connectivity_param.pco = 1;
25
+ memset(&sess->pdn_connectivity_param,
26
+ 0, sizeof(sess->pdn_connectivity_param));
27
+ sess->pdn_connectivity_param.eit = 1;
28
sess->pdn_connectivity_param.request_type =
29
OGS_NAS_EPS_REQUEST_TYPE_INITIAL;
30
esmbuf = testesm_build_pdn_connectivity_request(sess, false);
31
32
test_ue->attach_request_param.tmsi_status = 1;
33
test_ue->attach_request_param.mobile_station_classmark_2 = 1;
34
test_ue->attach_request_param.ue_usage_setting = 1;
35
- emmbuf = testemm_build_attach_request(test_ue, esmbuf, false, false);
36
+ emmbuf = testemm_build_attach_request(test_ue, esmbuf, true, false);
37
ABTS_PTR_NOTNULL(tc, emmbuf);
38
39
+ memset(&test_ue->initial_ue_param, 0, sizeof(test_ue->initial_ue_param));
40
sendbuf = test_s1ap_build_initial_ue_message(
41
test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Signalling, false);
42
ABTS_INT_EQUAL(tc, OGS_OK, rv);
43
44
rv = testenb_s1ap_send(s1ap, sendbuf);
45
ABTS_INT_EQUAL(tc, OGS_OK, rv);
46
47
+ /* Receive ESM Information Request */
48
+ recvbuf = testenb_s1ap_read(s1ap);
49
+ ABTS_PTR_NOTNULL(tc, recvbuf);
50
+ tests1ap_recv(test_ue, recvbuf);
51
+
52
+ /* Send ESM Information Response */
53
+ sess->esm_information_param.epco = 1;
54
+ esmbuf = testesm_build_esm_information_response(sess);
55
+ ABTS_PTR_NOTNULL(tc, esmbuf);
56
+ sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
57
+ ABTS_PTR_NOTNULL(tc, sendbuf);
58
+ rv = testenb_s1ap_send(s1ap, sendbuf);
59
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
60
+
61
/* Receive Initial Context Setup Request +
62
* Attach Accept +
63
* Activate Default Bearer Context Request */
64
65
ABTS_PTR_NOTNULL(tc, sendbuf);
66
rv = testenb_s1ap_send(s1ap, sendbuf);
67
ABTS_INT_EQUAL(tc, OGS_OK, rv);
68
+
69
+ /* Send UE Capability Info Indication */
70
+ sendbuf = tests1ap_build_ue_radio_capability_info_indication(test_ue);
71
+ ABTS_PTR_NOTNULL(tc, sendbuf);
72
+ rv = testenb_s1ap_send(s1ap, sendbuf);
73
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
74
+
75
+ /* Send Initial Context Setup Response */
76
+ sendbuf = test_s1ap_build_initial_context_setup_response(test_ue);
77
+ ABTS_PTR_NOTNULL(tc, sendbuf);
78
+ rv = testenb_s1ap_send(s1ap, sendbuf);
79
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
80
+
81
+ /* Send Attach Complete + Activate default EPS bearer cotext accept */
82
+ test_ue->nr_cgi.cell_id = 0x1234502;
83
+ bearer = test_bearer_find_by_ue_ebi(test_ue, 5);
84
+ ogs_assert(bearer);
85
+ esmbuf = testesm_build_activate_default_eps_bearer_context_accept(
86
+ bearer, false);
87
+ ABTS_PTR_NOTNULL(tc, esmbuf);
88
+ emmbuf = testemm_build_attach_complete(test_ue, esmbuf);
89
+ ABTS_PTR_NOTNULL(tc, emmbuf);
90
+ sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
91
+ ABTS_PTR_NOTNULL(tc, sendbuf);
92
+ rv = testenb_s1ap_send(s1ap, sendbuf);
93
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
94
+
95
+ /* Receive EMM information */
96
+ recvbuf = testenb_s1ap_read(s1ap);
97
+ ABTS_PTR_NOTNULL(tc, recvbuf);
98
+ tests1ap_recv(test_ue, recvbuf);
99
+
100
+ /* Send UE Context Release Request */
101
+ sendbuf = test_s1ap_build_ue_context_release_request(test_ue,
102
+ S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_user_inactivity);
103
+ ABTS_PTR_NOTNULL(tc, sendbuf);
104
+ rv = testenb_s1ap_send(s1ap, sendbuf);
105
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
106
107
/* Receive UE Context Release Command */
108
recvbuf = testenb_s1ap_read(s1ap);
109
open5gs_2.7.0.76.3f097.202402022026.tar.xz/tests/registration/dereg-test.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/tests/registration/dereg-test.c
Changed
201
1
2
test_ue_remove(test_ue);
3
}
4
5
+static void test6_issues2917_func(abts_case *tc, void *data)
6
+{
7
+ int rv;
8
+ ogs_socknode_t *ngap;
9
+ ogs_socknode_t *gtpu;
10
+ ogs_pkbuf_t *gmmbuf;
11
+ ogs_pkbuf_t *gsmbuf;
12
+ ogs_pkbuf_t *nasbuf;
13
+ ogs_pkbuf_t *sendbuf;
14
+ ogs_pkbuf_t *recvbuf;
15
+ ogs_ngap_message_t message;
16
+ int i;
17
+
18
+ ogs_nas_5gs_mobile_identity_suci_t mobile_identity_suci;
19
+ test_ue_t *test_ue = NULL;
20
+ test_sess_t *sess = NULL;
21
+ test_bearer_t *qos_flow = NULL;
22
+
23
+ bson_t *doc = NULL;
24
+
25
+ /* Setup Test UE & Session Context */
26
+ memset(&mobile_identity_suci, 0, sizeof(mobile_identity_suci));
27
+
28
+ mobile_identity_suci.h.supi_format = OGS_NAS_5GS_SUPI_FORMAT_IMSI;
29
+ mobile_identity_suci.h.type = OGS_NAS_5GS_MOBILE_IDENTITY_SUCI;
30
+ mobile_identity_suci.routing_indicator1 = 0;
31
+ mobile_identity_suci.routing_indicator2 = 0xf;
32
+ mobile_identity_suci.routing_indicator3 = 0xf;
33
+ mobile_identity_suci.routing_indicator4 = 0xf;
34
+ mobile_identity_suci.protection_scheme_id = OGS_PROTECTION_SCHEME_NULL;
35
+ mobile_identity_suci.home_network_pki_value = 0;
36
+
37
+ test_ue = test_ue_add_by_suci(&mobile_identity_suci, "0000203190");
38
+ ogs_assert(test_ue);
39
+
40
+ test_ue->nr_cgi.cell_id = 0x40001;
41
+
42
+ test_ue->nas.registration.tsc = 0;
43
+ test_ue->nas.registration.ksi = OGS_NAS_KSI_NO_KEY_IS_AVAILABLE;
44
+ test_ue->nas.registration.follow_on_request = 1;
45
+ test_ue->nas.registration.value = OGS_NAS_5GS_REGISTRATION_TYPE_INITIAL;
46
+
47
+ test_ue->k_string = "465b5ce8b199b49faa5f0a2ee238a6bc";
48
+ test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
49
+
50
+ /* gNB connects to AMF */
51
+ ngap = testngap_client(AF_INET);
52
+ ABTS_PTR_NOTNULL(tc, ngap);
53
+
54
+ /* gNB connects to UPF */
55
+ gtpu = test_gtpu_server(1, AF_INET);
56
+ ABTS_PTR_NOTNULL(tc, gtpu);
57
+
58
+ /* Send NG-Setup Reqeust */
59
+ sendbuf = testngap_build_ng_setup_request(0x4000, 26);
60
+ ABTS_PTR_NOTNULL(tc, sendbuf);
61
+ rv = testgnb_ngap_send(ngap, sendbuf);
62
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
63
+
64
+ /* Receive NG-Setup Response */
65
+ recvbuf = testgnb_ngap_read(ngap);
66
+ ABTS_PTR_NOTNULL(tc, recvbuf);
67
+ testngap_recv(test_ue, recvbuf);
68
+
69
+ /********** Insert Subscriber in Database */
70
+ doc = test_db_new_simple(test_ue);
71
+ ABTS_PTR_NOTNULL(tc, doc);
72
+ ABTS_INT_EQUAL(tc, OGS_OK, test_db_insert_ue(test_ue, doc));
73
+
74
+ /* Send Registration request */
75
+ gmmbuf = testgmm_build_registration_request(test_ue, NULL, false, false);
76
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
77
+
78
+ test_ue->registration_request_param.gmm_capability = 1;
79
+ test_ue->registration_request_param.s1_ue_network_capability = 1;
80
+ test_ue->registration_request_param.requested_nssai = 1;
81
+ test_ue->registration_request_param.last_visited_registered_tai = 1;
82
+ test_ue->registration_request_param.ue_usage_setting = 1;
83
+ nasbuf = testgmm_build_registration_request(test_ue, NULL, false, false);
84
+ ABTS_PTR_NOTNULL(tc, nasbuf);
85
+
86
+ sendbuf = testngap_build_initial_ue_message(test_ue, gmmbuf,
87
+ NGAP_RRCEstablishmentCause_mo_Signalling, false, true);
88
+ ABTS_PTR_NOTNULL(tc, sendbuf);
89
+ rv = testgnb_ngap_send(ngap, sendbuf);
90
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
91
+
92
+ /* Receive Authentication request */
93
+ recvbuf = testgnb_ngap_read(ngap);
94
+ ABTS_PTR_NOTNULL(tc, recvbuf);
95
+ testngap_recv(test_ue, recvbuf);
96
+
97
+ /* Send Authentication response */
98
+ gmmbuf = testgmm_build_authentication_response(test_ue);
99
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
100
+ sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
101
+ ABTS_PTR_NOTNULL(tc, sendbuf);
102
+ rv = testgnb_ngap_send(ngap, sendbuf);
103
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
104
+
105
+ /* Receive Security mode command */
106
+ recvbuf = testgnb_ngap_read(ngap);
107
+ ABTS_PTR_NOTNULL(tc, recvbuf);
108
+ testngap_recv(test_ue, recvbuf);
109
+
110
+ /* Send Security mode complete */
111
+ gmmbuf = testgmm_build_security_mode_complete(test_ue, nasbuf);
112
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
113
+ sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
114
+ ABTS_PTR_NOTNULL(tc, sendbuf);
115
+ rv = testgnb_ngap_send(ngap, sendbuf);
116
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
117
+
118
+ /* Receive InitialContextSetupRequest +
119
+ * Registration accept */
120
+ recvbuf = testgnb_ngap_read(ngap);
121
+ ABTS_PTR_NOTNULL(tc, recvbuf);
122
+ testngap_recv(test_ue, recvbuf);
123
+ ABTS_INT_EQUAL(tc,
124
+ NGAP_ProcedureCode_id_InitialContextSetup,
125
+ test_ue->ngap_procedure_code);
126
+
127
+ /* Send UERadioCapabilityInfoIndication */
128
+ sendbuf = testngap_build_ue_radio_capability_info_indication(test_ue);
129
+ ABTS_PTR_NOTNULL(tc, sendbuf);
130
+ rv = testgnb_ngap_send(ngap, sendbuf);
131
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
132
+
133
+ /* Send InitialContextSetupResponse */
134
+ sendbuf = testngap_build_initial_context_setup_response(test_ue, false);
135
+ ABTS_PTR_NOTNULL(tc, sendbuf);
136
+ rv = testgnb_ngap_send(ngap, sendbuf);
137
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
138
+
139
+ /* Send Registration complete */
140
+ gmmbuf = testgmm_build_registration_complete(test_ue);
141
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
142
+ sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
143
+ ABTS_PTR_NOTNULL(tc, sendbuf);
144
+ rv = testgnb_ngap_send(ngap, sendbuf);
145
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
146
+
147
+ /* Receive Configuration update command */
148
+ recvbuf = testgnb_ngap_read(ngap);
149
+ ABTS_PTR_NOTNULL(tc, recvbuf);
150
+ testngap_recv(test_ue, recvbuf);
151
+
152
+ /* Send PDU session establishment request */
153
+ sess = test_sess_add_by_dnn_and_psi(test_ue, "internet", 5);
154
+ ogs_assert(sess);
155
+
156
+ sess->ul_nas_transport_param.request_type =
157
+ OGS_NAS_5GS_REQUEST_TYPE_INITIAL;
158
+ sess->ul_nas_transport_param.dnn = 1;
159
+ sess->ul_nas_transport_param.s_nssai = 1;
160
+
161
+ sess->pdu_session_establishment_param.ssc_mode = 1;
162
+ sess->pdu_session_establishment_param.epco = 1;
163
+
164
+ gsmbuf = testgsm_build_pdu_session_establishment_request(sess);
165
+ ABTS_PTR_NOTNULL(tc, gsmbuf);
166
+ gmmbuf = testgmm_build_ul_nas_transport(sess,
167
+ OGS_NAS_PAYLOAD_CONTAINER_N1_SM_INFORMATION, gsmbuf);
168
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
169
+ sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
170
+ ABTS_PTR_NOTNULL(tc, sendbuf);
171
+ rv = testgnb_ngap_send(ngap, sendbuf);
172
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
173
+
174
+ /* Receive PDUSessionResourceSetupRequest +
175
+ * DL NAS transport +
176
+ * PDU session establishment accept */
177
+ recvbuf = testgnb_ngap_read(ngap);
178
+ ABTS_PTR_NOTNULL(tc, recvbuf);
179
+ testngap_recv(test_ue, recvbuf);
180
+ ABTS_INT_EQUAL(tc,
181
+ NGAP_ProcedureCode_id_PDUSessionResourceSetup,
182
+ test_ue->ngap_procedure_code);
183
+
184
+ /* Send GTP-U ICMP Packet */
185
+ qos_flow = test_qos_flow_find_by_qfi(sess, 1);
186
+ ogs_assert(qos_flow);
187
+ rv = test_gtpu_send_ping(gtpu, qos_flow, TEST_PING_IPV4);
188
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
189
+
190
+ /* Send PDUSessionResourceSetupResponse */
191
+ sendbuf = testngap_sess_build_pdu_session_resource_setup_response(sess);
192
+ ABTS_PTR_NOTNULL(tc, sendbuf);
193
+ rv = testgnb_ngap_send(ngap, sendbuf);
194
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
195
+
196
+ /* Receive GTP-U ICMP Packet */
197
+ recvbuf = testgnb_gtpu_read(gtpu);
198
+ ABTS_PTR_NOTNULL(tc, recvbuf);
199
+ ogs_pkbuf_free(recvbuf);
200
+
201
open5gs_2.7.0.76.3f097.202402022026.tar.xz/tests/registration/gmm-status-test.c -> open5gs_2.7.0.81.8762.202402032026.tar.xz/tests/registration/gmm-status-test.c
Changed
119
1
2
ABTS_PTR_NOTNULL(tc, gtpu);
3
4
/* Send NG-Setup Reqeust */
5
- sendbuf = testngap_build_ng_setup_request(0x4000, 28);
6
+ sendbuf = testngap_build_ng_setup_request(0x4000, 22);
7
ABTS_PTR_NOTNULL(tc, sendbuf);
8
rv = testgnb_ngap_send(ngap, sendbuf);
9
ABTS_INT_EQUAL(tc, OGS_OK, rv);
10
11
ABTS_INT_EQUAL(tc, OGS_OK, test_db_insert_ue(test_ue, doc));
12
13
/* Send Registration request */
14
+ test_ue->registration_request_param.guti = 1;
15
gmmbuf = testgmm_build_registration_request(test_ue, NULL, false, false);
16
ABTS_PTR_NOTNULL(tc, gmmbuf);
17
18
19
rv = testgnb_ngap_send(ngap, sendbuf);
20
ABTS_INT_EQUAL(tc, OGS_OK, rv);
21
22
+ /* Receive Identity request */
23
+ recvbuf = testgnb_ngap_read(ngap);
24
+ ABTS_PTR_NOTNULL(tc, recvbuf);
25
+ testngap_recv(test_ue, recvbuf);
26
+
27
+ /* Send Identity response */
28
+ gmmbuf = testgmm_build_identity_response(test_ue);
29
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
30
+ sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
31
+ ABTS_PTR_NOTNULL(tc, sendbuf);
32
+ rv = testgnb_ngap_send(ngap, sendbuf);
33
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
34
+
35
/* Receive Authentication request */
36
recvbuf = testgnb_ngap_read(ngap);
37
ABTS_PTR_NOTNULL(tc, recvbuf);
38
39
rv = testgnb_ngap_send(ngap, sendbuf);
40
ABTS_INT_EQUAL(tc, OGS_OK, rv);
41
42
+ /* Send GMM Status */
43
+ gmmbuf = testgmm_build_gmm_status(test_ue,
44
+ OGS_5GMM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_THE_PROTOCOL_STATE);
45
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
46
+ sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
47
+ ABTS_PTR_NOTNULL(tc, sendbuf);
48
+ rv = testgnb_ngap_send(ngap, sendbuf);
49
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
50
+
51
/* Receive InitialContextSetupRequest +
52
* Registration accept */
53
recvbuf = testgnb_ngap_read(ngap);
54
55
NGAP_ProcedureCode_id_InitialContextSetup,
56
test_ue->ngap_procedure_code);
57
58
+ /* Send UERadioCapabilityInfoIndication */
59
+ sendbuf = testngap_build_ue_radio_capability_info_indication(test_ue);
60
+ ABTS_PTR_NOTNULL(tc, sendbuf);
61
+ rv = testgnb_ngap_send(ngap, sendbuf);
62
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
63
+
64
/* Send InitialContextSetupResponse */
65
sendbuf = testngap_build_initial_context_setup_response(test_ue, false);
66
ABTS_PTR_NOTNULL(tc, sendbuf);
67
68
sess->ul_nas_transport_param.request_type =
69
OGS_NAS_5GS_REQUEST_TYPE_INITIAL;
70
sess->ul_nas_transport_param.dnn = 1;
71
- sess->ul_nas_transport_param.s_nssai = 1;
72
+ sess->ul_nas_transport_param.s_nssai = 0;
73
74
sess->pdu_session_establishment_param.ssc_mode = 1;
75
sess->pdu_session_establishment_param.epco = 1;
76
77
NGAP_ProcedureCode_id_PDUSessionResourceSetup,
78
test_ue->ngap_procedure_code);
79
80
- /*
81
- * Related to issue #536. When running with VirtualBox 1 Core,
82
- * AMF sends namf-callback response very late. In SMF,
83
- * the Session context has already been removed, so an assertion occurs.
84
- *
85
- * It seems to be related to the response part of MHD. We will check
86
- * if the same situation occurs after upgrading to nghttp2.
87
- *
88
- * If this issue still occurs on nghttp2,
89
- * I will remove the assertion from SMF.
90
- */
91
- ogs_msleep(100);
92
+ /* Send PDUSessionResourceSetupResponse */
93
+ sendbuf = testngap_sess_build_pdu_session_resource_setup_response(sess);
94
+ ABTS_PTR_NOTNULL(tc, sendbuf);
95
+ rv = testgnb_ngap_send(ngap, sendbuf);
96
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
97
98
- /* Send GMM Status */
99
- gmmbuf = testgmm_build_gmm_status(test_ue,
100
- OGS_5GMM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_THE_PROTOCOL_STATE);
101
- ABTS_PTR_NOTNULL(tc, gmmbuf);
102
- sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
103
+ /* Send UEContextReleaseRequest */
104
+ sendbuf = testngap_build_ue_context_release_request(test_ue,
105
+ NGAP_Cause_PR_radioNetwork, NGAP_CauseRadioNetwork_user_inactivity,
106
+ true);
107
ABTS_PTR_NOTNULL(tc, sendbuf);
108
rv = testgnb_ngap_send(ngap, sendbuf);
109
ABTS_INT_EQUAL(tc, OGS_OK, rv);
110
111
rv = testgnb_ngap_send(ngap, sendbuf);
112
ABTS_INT_EQUAL(tc, OGS_OK, rv);
113
114
+ ogs_msleep(300);
115
+
116
/********** Remove Subscriber in Database */
117
ABTS_INT_EQUAL(tc, OGS_OK, test_db_remove_ue(test_ue));
118
119