Changes of Revision 391
commit_3f0979dab2b4c825c1f363dbb9847675b986a90c.txt
Deleted
commit_47419be650e57160a2e94575a1e316655c0af508.txt
Added
open5gs_2.7.0.76.3f097.dsc -> open5gs_2.7.0.77.47419.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
6
+Version: 2.7.0.77.47419
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
- 52d0cddbf1c93aa05ea7bdfddccd049f88003e12 14473388 open5gs_2.7.0.76.3f097.tar.xz
15
+ f87b95a9643431682cc2d456fd5cdbf2b7e0284f 14472804 open5gs_2.7.0.77.47419.tar.xz
16
Checksums-Sha256:
17
- bda34e545084cd5bb87bd068b3e26e8ee33e8505edf1e8cd3404f164b26db716 14473388 open5gs_2.7.0.76.3f097.tar.xz
18
+ 8ead51a1b62de3001a281fde0db067064bdb11edf89916dc9cbbe2e5fd59e77d 14472804 open5gs_2.7.0.77.47419.tar.xz
19
Files:
20
- 1ad2f5bc536e3c1326eb0cf148303691 14473388 open5gs_2.7.0.76.3f097.tar.xz
21
+ ec1e3da9ca9bb4332d4564250528d07a 14472804 open5gs_2.7.0.77.47419.tar.xz
22
open5gs_2.7.0.76.3f097.tar.xz/.tarball-version -> open5gs_2.7.0.77.47419.tar.xz/.tarball-version
Changed
4
1
2
-2.7.0.76-3f097
3
+2.7.0.77-47419
4
open5gs_2.7.0.76.3f097.tar.xz/debian/changelog -> open5gs_2.7.0.77.47419.tar.xz/debian/changelog
Changed
12
1
2
-open5gs (2.7.0.76.3f097) unstable; urgency=medium
3
+open5gs (2.7.0.77.47419) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom master feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Fri, 02 Feb 2024 12:27:33 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Sat, 03 Feb 2024 00:42:48 +0000
9
10
open5gs (2.7.0) unstable; urgency=medium
11
12
open5gs_2.7.0.76.3f097.tar.xz/src/amf/amf-sm.c -> open5gs_2.7.0.77.47419.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.tar.xz/src/amf/context.h -> open5gs_2.7.0.77.47419.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.tar.xz/src/amf/gmm-handler.c -> open5gs_2.7.0.77.47419.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.tar.xz/src/amf/ngap-handler.c -> open5gs_2.7.0.77.47419.tar.xz/src/amf/ngap-handler.c
Changed
14
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
open5gs_2.7.0.76.3f097.tar.xz/src/amf/nsmf-handler.c -> open5gs_2.7.0.77.47419.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.tar.xz/src/smf/gsm-sm.c -> open5gs_2.7.0.77.47419.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.tar.xz/tests/registration/dereg-test.c -> open5gs_2.7.0.77.47419.tar.xz/tests/registration/dereg-test.c
Changed
314
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
+ /* Send GTP-U ICMP Packet */
202
+ rv = test_gtpu_send_ping(gtpu, qos_flow, TEST_PING_IPV4);
203
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
204
+
205
+ /* Receive GTP-U ICMP Packet */
206
+ recvbuf = testgnb_gtpu_read(gtpu);
207
+ ABTS_PTR_NOTNULL(tc, recvbuf);
208
+ ogs_pkbuf_free(recvbuf);
209
+
210
+ /* Send PDU Session release request */
211
+ sess->ul_nas_transport_param.request_type = 0;
212
+ sess->ul_nas_transport_param.dnn = 0;
213
+ sess->ul_nas_transport_param.s_nssai = 0;
214
+
215
+ sess->pdu_session_establishment_param.ssc_mode = 0;
216
+ sess->pdu_session_establishment_param.epco = 0;
217
+
218
+ gsmbuf = testgsm_build_pdu_session_release_request(sess);
219
+ ABTS_PTR_NOTNULL(tc, gsmbuf);
220
+ gmmbuf = testgmm_build_ul_nas_transport(sess,
221
+ OGS_NAS_PAYLOAD_CONTAINER_N1_SM_INFORMATION, gsmbuf);
222
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
223
+ sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
224
+ ABTS_PTR_NOTNULL(tc, sendbuf);
225
+ rv = testgnb_ngap_send(ngap, sendbuf);
226
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
227
+
228
+ /* Receive PDUSessionResourceReleaseCommand +
229
+ * DL NAS transport +
230
+ * PDU session release command */
231
+ recvbuf = testgnb_ngap_read(ngap);
232
+ ABTS_PTR_NOTNULL(tc, recvbuf);
233
+ testngap_recv(test_ue, recvbuf);
234
+ ABTS_INT_EQUAL(tc,
235
+ NGAP_ProcedureCode_id_PDUSessionResourceRelease,
236
+ test_ue->ngap_procedure_code);
237
+
238
+ /* Send UplinkNASTransport +
239
+ * UL NAS trasnport +
240
+ * PDU session resource release complete */
241
+ sess->ul_nas_transport_param.request_type = 0;
242
+ sess->ul_nas_transport_param.dnn = 0;
243
+ sess->ul_nas_transport_param.s_nssai = 0;
244
+
245
+ sess->pdu_session_establishment_param.ssc_mode = 0;
246
+ sess->pdu_session_establishment_param.epco = 0;
247
+
248
+ gsmbuf = testgsm_build_pdu_session_release_complete(sess);
249
+ ABTS_PTR_NOTNULL(tc, gsmbuf);
250
+ gmmbuf = testgmm_build_ul_nas_transport(sess,
251
+ OGS_NAS_PAYLOAD_CONTAINER_N1_SM_INFORMATION, gsmbuf);
252
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
253
+ sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
254
+ ABTS_PTR_NOTNULL(tc, sendbuf);
255
+ rv = testgnb_ngap_send(ngap, sendbuf);
256
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
257
+
258
+ /* Send PDUSessionResourceReleaseResponse */
259
+ sendbuf = testngap_build_pdu_session_resource_release_response(sess);
260
+ ABTS_PTR_NOTNULL(tc, sendbuf);
261
+ rv = testgnb_ngap_send(ngap, sendbuf);
262
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
263
+
264
+ ogs_msleep(100);
265
+
266
+ /* Send De-registration request */
267
+ gmmbuf = testgmm_build_de_registration_request(test_ue, 1, true, true);
268
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
269
+ sendbuf = testngap_build_uplink_nas_transport(test_ue, gmmbuf);
270
+ ABTS_PTR_NOTNULL(tc, sendbuf);
271
+ rv = testgnb_ngap_send(ngap, sendbuf);
272
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
273
+
274
+ /* Receive UEContextReleaseCommand */
275
+ recvbuf = testgnb_ngap_read(ngap);
276
+ ABTS_PTR_NOTNULL(tc, recvbuf);
277
+ testngap_recv(test_ue, recvbuf);
278
+ ABTS_INT_EQUAL(tc,
279
+ NGAP_ProcedureCode_id_UEContextRelease,
280
+ test_ue->ngap_procedure_code);
281
+
282
+ /* Send UEContextReleaseComplete */
283
+ sendbuf = testngap_build_ue_context_release_complete(test_ue);
284
+ ABTS_PTR_NOTNULL(tc, sendbuf);
285
+ rv = testgnb_ngap_send(ngap, sendbuf);
286
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
287
+
288
+ ogs_msleep(300);
289
+
290
+ /********** Remove Subscriber in Database */
291
+ ABTS_INT_EQUAL(tc, OGS_OK, test_db_remove_ue(test_ue));
292
+
293
+ /* gNB disonncect from UPF */
294
+ testgnb_gtpu_close(gtpu);
295
+
296
+ /* gNB disonncect from AMF */
297
+ testgnb_ngap_close(ngap);
298
+
299
+ /* Clear Test UE Context */
300
+ test_ue_remove(test_ue);
301
+}
302
+
303
abts_suite *test_dereg(abts_suite *suite)
304
{
305
suite = ADD_SUITE(suite)
306
307
abts_run_test(suite, test3_func, NULL);
308
abts_run_test(suite, test4_func, NULL);
309
abts_run_test(suite, test5_func, NULL);
310
+ abts_run_test(suite, test6_issues2917_func, NULL);
311
312
return suite;
313
}
314