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 115
commit_689574a2d9ce9f10d9a5b861a1b5953171eed095.txt
Added
commit_a8f83989f4fdd55a176de3f159aa026750a5c5a8.txt
Deleted
open5gs_2.5.5.100.a8f8.dsc -> open5gs_2.5.5.101.6895.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-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
4
Architecture: any
5
-Version: 2.5.5.100.a8f8
6
+Version: 2.5.5.101.6895
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
- e395a7378bf13b85fe3b229b74e70007e5583fc7 13611620 open5gs_2.5.5.100.a8f8.tar.xz
15
+ 5d87a89ff215cddb2a6c415bdf79a1b643c34ee7 13611540 open5gs_2.5.5.101.6895.tar.xz
16
Checksums-Sha256:
17
- 84d699461e4bb14e733633f9a8d6ccb10b6ae49441a357fe973e8cf04b8b0193 13611620 open5gs_2.5.5.100.a8f8.tar.xz
18
+ 1b3c16c42512e82be1572559054333fc8829a5f7f9e3700cf0e5768038fb630a 13611540 open5gs_2.5.5.101.6895.tar.xz
19
Files:
20
- f9e06dfc04435d7b6f142689b0bd6ce4 13611620 open5gs_2.5.5.100.a8f8.tar.xz
21
+ 8a5ca2672687a98d4cdf0727e8146c1f 13611540 open5gs_2.5.5.101.6895.tar.xz
22
open5gs_2.5.5.100.a8f8.tar.xz/.tarball-version -> open5gs_2.5.5.101.6895.tar.xz/.tarball-version
Changed
4
1
2
-2.5.5.100-a8f8
3
+2.5.5.101-6895
4
open5gs_2.5.5.100.a8f8.tar.xz/debian/changelog -> open5gs_2.5.5.101.6895.tar.xz/debian/changelog
Changed
12
1
2
-open5gs (2.5.5.100.a8f8) unstable; urgency=medium
3
+open5gs (2.5.5.101.6895) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom master feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Mon, 23 Jan 2023 00:34:51 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Mon, 23 Jan 2023 02:03:42 +0000
9
10
open5gs (2.5.6) unstable; urgency=medium
11
12
open5gs_2.5.5.100.a8f8.tar.xz/lib/core/ogs-errno.h -> open5gs_2.5.5.101.6895.tar.xz/lib/core/ogs-errno.h
Changed
19
1
2
3
#endif
4
5
-#define OGS_OK 0
6
-#define OGS_ERROR -1
7
-#define OGS_RETRY -2
8
-#define OGS_TIMEUP -3
9
-#define OGS_DONE -4
10
+#define OGS_OK 0
11
+#define OGS_ERROR -1
12
+#define OGS_RETRY -2
13
+#define OGS_TIMEUP -3
14
+#define OGS_DONE -4
15
+#define OGS_NOTFOUND -5
16
17
char *ogs_strerror(ogs_err_t err, char *buf, size_t size);
18
19
open5gs_2.5.5.100.a8f8.tar.xz/lib/core/ogs-pkbuf.c -> open5gs_2.5.5.101.6895.tar.xz/lib/core/ogs-pkbuf.c
Changed
17
1
2
newbuf = ogs_pkbuf_alloc_debug(NULL, size, file_line);
3
if (!newbuf) {
4
ogs_error("ogs_pkbuf_alloc() failed size=%d", size);
5
+ ogs_pkbuf_free(pkbuf);
6
return NULL;
7
}
8
9
10
ogs_pool_alloc(&pool->pkbuf, &newbuf);
11
if (!newbuf) {
12
ogs_error("ogs_pkbuf_copy() failed");
13
+ ogs_pkbuf_free(pkbuf);
14
ogs_thread_mutex_unlock(&pool->mutex);
15
return NULL;
16
}
17
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/amf-sm.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/amf-sm.c
Changed
107
1
2
3
void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
4
{
5
- int rv;
6
+ int r, rv;
7
char bufOGS_ADDRSTRLEN;
8
const char *api_version = NULL;
9
10
11
}
12
13
ogs_error("%s Cannot receive SBI message", amf_ue->suci);
14
- ogs_expect(OGS_OK ==
15
- nas_5gs_send_gmm_reject_from_sbi(amf_ue,
16
- OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT));
17
+ r = nas_5gs_send_gmm_reject_from_sbi(amf_ue,
18
+ OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT);
19
+ ogs_expect(r == OGS_OK);
20
+ ogs_assert(r != OGS_ERROR);
21
break;
22
23
case OGS_SBI_OBJ_SESS_TYPE:
24
25
ogs_error("%d:%d Cannot receive SBI message",
26
sess->psi, sess->pti);
27
if (sess->payload_container_type) {
28
- ogs_expect(OGS_OK ==
29
- nas_5gs_send_back_gsm_message(sess,
30
+ r = nas_5gs_send_back_gsm_message(sess,
31
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
32
- AMF_NAS_BACKOFF_TIME));
33
+ AMF_NAS_BACKOFF_TIME);
34
+ ogs_expect(r == OGS_OK);
35
+ ogs_assert(r != OGS_ERROR);
36
} else {
37
- ogs_expect(OGS_OK ==
38
- ngap_send_error_indication2(amf_ue,
39
+ r = ngap_send_error_indication2(amf_ue,
40
NGAP_Cause_PR_transport,
41
- NGAP_CauseTransport_transport_resource_unavailable)
42
- );
43
+ NGAP_CauseTransport_transport_resource_unavailable);
44
+ ogs_expect(r == OGS_OK);
45
+ ogs_assert(r != OGS_ERROR);
46
}
47
break;
48
49
50
ogs_fsm_dispatch(&gnb->sm, e);
51
} else {
52
ogs_error("Cannot decode NGAP message");
53
- ogs_assert(OGS_OK ==
54
- ngap_send_error_indication(
55
+ r = ngap_send_error_indication(
56
gnb, NULL, NULL, NGAP_Cause_PR_protocol,
57
- NGAP_CauseProtocol_abstract_syntax_error_falsely_constructed_message));
58
+ NGAP_CauseProtocol_abstract_syntax_error_falsely_constructed_message);
59
+ ogs_expect(r == OGS_OK);
60
+ ogs_assert(r != OGS_ERROR);
61
}
62
63
ogs_ngap_free(&ngap_message);
64
65
pkbuf = e->pkbuf;
66
ogs_assert(pkbuf);
67
68
- ogs_expect(OGS_OK == ngap_send_to_ran_ue(ran_ue, pkbuf));
69
+ r = ngap_send_to_ran_ue(ran_ue, pkbuf);
70
+ ogs_expect(r == OGS_OK);
71
+ ogs_assert(r != OGS_ERROR);
72
ogs_timer_delete(e->timer);
73
break;
74
case AMF_TIMER_NG_HOLDING:
75
76
if (!amf_ue) {
77
amf_ue = amf_ue_add(ran_ue);
78
if (amf_ue == NULL) {
79
- ogs_expect(OGS_OK ==
80
- ngap_send_ran_ue_context_release_command(ran_ue,
81
+ r = ngap_send_ran_ue_context_release_command(
82
+ ran_ue,
83
NGAP_Cause_PR_misc,
84
NGAP_CauseMisc_control_processing_overload,
85
- NGAP_UE_CTX_REL_NG_CONTEXT_REMOVE, 0));
86
+ NGAP_UE_CTX_REL_NG_CONTEXT_REMOVE, 0);
87
+ ogs_expect(r == OGS_OK);
88
+ ogs_assert(r != OGS_ERROR);
89
ogs_pkbuf_free(pkbuf);
90
return;
91
}
92
93
/* De-associate NG with NAS/EMM */
94
ran_ue_deassociate(amf_ue->ran_ue);
95
96
- ogs_expect(OGS_OK ==
97
- ngap_send_ran_ue_context_release_command(amf_ue->ran_ue,
98
+ r = ngap_send_ran_ue_context_release_command(amf_ue->ran_ue,
99
NGAP_Cause_PR_nas, NGAP_CauseNas_normal_release,
100
- NGAP_UE_CTX_REL_NG_CONTEXT_REMOVE, 0));
101
+ NGAP_UE_CTX_REL_NG_CONTEXT_REMOVE, 0);
102
+ ogs_expect(r == OGS_OK);
103
+ ogs_assert(r != OGS_ERROR);
104
}
105
amf_ue_associate_ran_ue(amf_ue, ran_ue);
106
107
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/gmm-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/gmm-handler.c
Changed
190
1
2
{
3
amf_sess_t *sess = NULL;
4
uint16_t psimask = 0;
5
- int xact_count = 0;
6
+ int xact_count = 0, r;
7
8
ogs_nas_uplink_data_status_t *uplink_data_status = NULL;
9
ogs_nas_pdu_session_status_t *pdu_session_status = NULL;
10
11
}
12
}
13
14
- if (amf_sess_xact_count(amf_ue) == xact_count)
15
- ogs_assert(OGS_OK ==
16
- nas_5gs_send_service_accept(amf_ue));
17
+ if (amf_sess_xact_count(amf_ue) == xact_count) {
18
+ r = nas_5gs_send_service_accept(amf_ue);
19
+ ogs_expect(r == OGS_OK);
20
+ ogs_assert(r != OGS_ERROR);
21
+ }
22
23
return OGS_5GMM_CAUSE_REQUEST_ACCEPTED;
24
}
25
26
int gmm_handle_deregistration_request(amf_ue_t *amf_ue,
27
ogs_nas_5gs_deregistration_request_from_ue_t *deregistration_request)
28
{
29
+ int r;
30
ogs_nas_de_registration_type_t *de_registration_type = NULL;
31
32
ogs_assert(amf_ue);
33
34
amf_sbi_send_release_all_sessions(
35
amf_ue, AMF_RELEASE_SM_CONTEXT_NO_STATE);
36
37
- if (ogs_list_count(&amf_ue->sess_list) == 0)
38
- ogs_assert(OGS_OK ==
39
- nas_5gs_send_de_registration_accept(amf_ue));
40
+ if (ogs_list_count(&amf_ue->sess_list) == 0) {
41
+ r = nas_5gs_send_de_registration_accept(amf_ue);
42
+ ogs_expect(r == OGS_OK);
43
+ ogs_assert(r != OGS_ERROR);
44
+ }
45
46
return OGS_OK;
47
}
48
49
int gmm_handle_ul_nas_transport(amf_ue_t *amf_ue,
50
ogs_nas_5gs_ul_nas_transport_t *ul_nas_transport)
51
{
52
+ int r;
53
ogs_slice_data_t *selected_slice = NULL;
54
amf_sess_t *sess = NULL;
55
amf_nsmf_pdusession_sm_context_param_t param;
56
57
58
if (!payload_container_type->value) {
59
ogs_error("%s No Payload container type", amf_ue->supi);
60
- ogs_assert(OGS_OK ==
61
- nas_5gs_send_gmm_status(
62
- amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION));
63
+ r = nas_5gs_send_gmm_status(
64
+ amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION);
65
+ ogs_expect(r == OGS_OK);
66
+ ogs_assert(r != OGS_ERROR);
67
return OGS_ERROR;
68
}
69
70
if (!payload_container->length) {
71
ogs_error("%s No Payload container length", amf_ue->supi);
72
- ogs_assert(OGS_OK ==
73
- nas_5gs_send_gmm_status(
74
- amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION));
75
+ r = nas_5gs_send_gmm_status(
76
+ amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION);
77
+ ogs_expect(r == OGS_OK);
78
+ ogs_assert(r != OGS_ERROR);
79
return OGS_ERROR;
80
}
81
82
if (!payload_container->buffer) {
83
ogs_error("%s No Payload container buffer", amf_ue->supi);
84
- ogs_assert(OGS_OK ==
85
- nas_5gs_send_gmm_status(
86
- amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION));
87
+ r = nas_5gs_send_gmm_status(
88
+ amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION);
89
+ ogs_expect(r == OGS_OK);
90
+ ogs_assert(r != OGS_ERROR);
91
return OGS_ERROR;
92
}
93
94
if ((ul_nas_transport->presencemask &
95
OGS_NAS_5GS_UL_NAS_TRANSPORT_PDU_SESSION_ID_PRESENT) == 0) {
96
ogs_error("%s No PDU session ID", amf_ue->supi);
97
- ogs_assert(OGS_OK ==
98
- nas_5gs_send_gmm_status(
99
- amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION));
100
+ r = nas_5gs_send_gmm_status(
101
+ amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION);
102
+ ogs_expect(r == OGS_OK);
103
+ ogs_assert(r != OGS_ERROR);
104
return OGS_ERROR;
105
}
106
107
108
if (*pdu_session_id == OGS_NAS_PDU_SESSION_IDENTITY_UNASSIGNED) {
109
ogs_error("%s PDU session identity is unassigned",
110
amf_ue->supi);
111
- ogs_assert(OGS_OK ==
112
- nas_5gs_send_gmm_status(
113
- amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION));
114
+ r = nas_5gs_send_gmm_status(
115
+ amf_ue, OGS_5GMM_CAUSE_INVALID_MANDATORY_INFORMATION);
116
+ ogs_expect(r == OGS_OK);
117
+ ogs_assert(r != OGS_ERROR);
118
return OGS_ERROR;
119
}
120
121
122
if (!sess) {
123
ogs_error("%s No Session Context %d",
124
amf_ue->supi, gsm_header->message_type);
125
- ogs_assert(OGS_OK ==
126
- nas_5gs_send_gmm_status(amf_ue,
127
- OGS_5GMM_CAUSE_INSUFFICIENT_USER_PLANE_RESOURCES_FOR_THE_PDU_SESSION));
128
+ r = nas_5gs_send_gmm_status(amf_ue,
129
+ OGS_5GMM_CAUSE_INSUFFICIENT_USER_PLANE_RESOURCES_FOR_THE_PDU_SESSION);
130
+ ogs_expect(r == OGS_OK);
131
+ ogs_assert(r != OGS_ERROR);
132
return OGS_ERROR;
133
}
134
}
135
136
if (!selected_slice || !sess->dnn) {
137
ogs_warn("%s DNN Not Supported OR "
138
"Not Subscribed in the Slice", amf_ue->supi);
139
- ogs_assert(OGS_OK ==
140
- nas_5gs_send_gmm_status(amf_ue, OGS_5GMM_CAUSE_DNN_NOT_SUPPORTED_OR_NOT_SUBSCRIBED_IN_THE_SLICE));
141
+ r = nas_5gs_send_gmm_status(amf_ue,
142
+ OGS_5GMM_CAUSE_DNN_NOT_SUPPORTED_OR_NOT_SUBSCRIBED_IN_THE_SLICE);
143
+ ogs_expect(r == OGS_OK);
144
+ ogs_assert(r != OGS_ERROR);
145
return OGS_ERROR;
146
}
147
148
149
if (!SESSION_CONTEXT_IN_SMF(sess)) {
150
ogs_error("%s:%d Session Context is not in SMF %d",
151
amf_ue->supi, sess->psi, gsm_header->message_type);
152
- ogs_assert(OGS_OK ==
153
- nas_5gs_send_back_gsm_message(sess,
154
- OGS_5GMM_CAUSE_DNN_NOT_SUPPORTED_OR_NOT_SUBSCRIBED_IN_THE_SLICE, 0));
155
+ r = nas_5gs_send_back_gsm_message(sess,
156
+ OGS_5GMM_CAUSE_DNN_NOT_SUPPORTED_OR_NOT_SUBSCRIBED_IN_THE_SLICE, 0);
157
+ ogs_expect(r == OGS_OK);
158
+ ogs_assert(r != OGS_ERROR);
159
return OGS_ERROR;
160
}
161
162
163
memset(¶m, 0, sizeof(param));
164
param.acknowledgement_requested = 1;
165
param.guti = 1;
166
- ogs_assert(OGS_OK ==
167
- nas_5gs_send_configuration_update_command(
168
- amf_ue, ¶m));
169
+ r = nas_5gs_send_configuration_update_command(
170
+ amf_ue, ¶m);
171
+ ogs_expect(r == OGS_OK);
172
+ ogs_assert(r != OGS_ERROR);
173
174
AMF_UE_CLEAR_PAGING_INFO(amf_ue);
175
}
176
177
default:
178
ogs_error("%s Unknown Payload container type %d",
179
amf_ue->supi, payload_container_type->value);
180
- ogs_assert(OGS_OK ==
181
- nas_5gs_send_gmm_status(amf_ue,
182
- OGS_5GMM_CAUSE_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED));
183
+ r = nas_5gs_send_gmm_status(amf_ue,
184
+ OGS_5GMM_CAUSE_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED);
185
+ ogs_expect(r == OGS_OK);
186
+ ogs_assert(r != OGS_ERROR);
187
return OGS_ERROR;
188
}
189
190
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/gmm-sm.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/gmm-sm.c
Changed
201
1
2
3
ogs_sbi_message_t *sbi_message = NULL;
4
5
- int state = 0;
6
+ int r, state = 0;
7
8
ogs_assert(e);
9
10
11
OGS_FSM_TRAN(&amf_ue->sm, &gmm_state_exception);
12
} else {
13
amf_ue->t3570.retry_count++;
14
- ogs_assert(OGS_OK ==
15
- nas_5gs_send_identity_request(amf_ue));
16
+ r = nas_5gs_send_identity_request(amf_ue);
17
+ ogs_expect(r == OGS_OK);
18
+ ogs_assert(r != OGS_ERROR);
19
}
20
break;
21
22
23
OGS_FSM_TRAN(&amf_ue->sm, &gmm_state_exception);
24
} else {
25
amf_ue->t3522.retry_count++;
26
- ogs_assert(OGS_OK ==
27
- nas_5gs_send_de_registration_request(amf_ue,
28
- OpenAPI_deregistration_reason_NULL));
29
+ r = nas_5gs_send_de_registration_request(amf_ue,
30
+ OpenAPI_deregistration_reason_NULL);
31
+ ogs_expect(r == OGS_OK);
32
+ ogs_assert(r != OGS_ERROR);
33
}
34
break;
35
36
37
break;
38
39
CASE(OGS_SBI_HTTP_METHOD_DELETE)
40
- if (state != AMF_NETWORK_INITIATED_DE_REGISTERED)
41
- ogs_assert(OGS_OK ==
42
- nas_5gs_send_de_registration_accept(amf_ue));
43
+ if (state != AMF_NETWORK_INITIATED_DE_REGISTERED) {
44
+ r = nas_5gs_send_de_registration_accept(amf_ue);
45
+ ogs_expect(r == OGS_OK);
46
+ ogs_assert(r != OGS_ERROR);
47
+ }
48
49
PCF_AM_POLICY_CLEAR(amf_ue);
50
break;
51
52
53
void gmm_state_registered(ogs_fsm_t *s, amf_event_t *e)
54
{
55
- int i;
56
+ int i, r;
57
58
amf_ue_t *amf_ue = NULL;
59
amf_sess_t *sess = NULL;
60
61
} else {
62
amf_ue->t3513.retry_count++;
63
/* If t3513 is timeout, the saved pkbuf is used. */
64
- ogs_assert(OGS_OK == ngap_send_paging(amf_ue));
65
+ r = ngap_send_paging(amf_ue);
66
+ ogs_expect(r == OGS_OK);
67
+ ogs_assert(r != OGS_ERROR);
68
}
69
break;
70
71
72
* If t3555 is timeout, the saved pkbuf is used.
73
* In this case, ack should be set to 1 for timer expiration
74
*/
75
- ogs_assert(OGS_OK ==
76
- nas_5gs_send_configuration_update_command(amf_ue, NULL));
77
+ r = nas_5gs_send_configuration_update_command(amf_ue, NULL);
78
+ ogs_expect(r == OGS_OK);
79
+ ogs_assert(r != OGS_ERROR);
80
}
81
break;
82
83
84
OGS_FSM_TRAN(&amf_ue->sm, &gmm_state_exception);
85
} else {
86
amf_ue->t3570.retry_count++;
87
- ogs_assert(OGS_OK ==
88
- nas_5gs_send_identity_request(amf_ue));
89
+ r = nas_5gs_send_identity_request(amf_ue);
90
+ ogs_expect(r == OGS_OK);
91
+ ogs_assert(r != OGS_ERROR);
92
}
93
break;
94
95
96
97
static void common_register_state(ogs_fsm_t *s, amf_event_t *e)
98
{
99
- int rv, xact_count = 0;
100
+ int r, rv, xact_count = 0;
101
ogs_nas_5gmm_cause_t gmm_cause;
102
103
amf_ue_t *amf_ue = NULL;
104
105
if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
106
ogs_error("gmm_handle_registration_request() failed %d",
107
gmm_cause);
108
- ogs_assert(OGS_OK ==
109
- nas_5gs_send_registration_reject(amf_ue, gmm_cause));
110
+ r = nas_5gs_send_registration_reject(amf_ue, gmm_cause);
111
+ ogs_expect(r == OGS_OK);
112
+ ogs_assert(r != OGS_ERROR);
113
OGS_FSM_TRAN(s, gmm_state_exception);
114
break;
115
}
116
117
if (!AMF_UE_HAVE_SUCI(amf_ue)) {
118
CLEAR_AMF_UE_TIMER(amf_ue->t3570);
119
- ogs_assert(OGS_OK ==
120
- nas_5gs_send_identity_request(amf_ue));
121
+ r = nas_5gs_send_identity_request(amf_ue);
122
+ ogs_expect(r == OGS_OK);
123
+ ogs_assert(r != OGS_ERROR);
124
break;
125
}
126
127
128
if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
129
ogs_error("%s gmm_handle_registration_update() "
130
"failed %d", amf_ue->suci, gmm_cause);
131
- ogs_assert(OGS_OK ==
132
- nas_5gs_send_registration_reject(amf_ue, gmm_cause));
133
+ r = nas_5gs_send_registration_reject(amf_ue, gmm_cause);
134
+ ogs_expect(r == OGS_OK);
135
+ ogs_assert(r != OGS_ERROR);
136
OGS_FSM_TRAN(s, gmm_state_exception);
137
break;
138
}
139
140
}
141
142
CLEAR_AMF_UE_TIMER(amf_ue->t3550);
143
- ogs_assert(OGS_OK ==
144
- nas_5gs_send_registration_accept(amf_ue));
145
+ r = nas_5gs_send_registration_accept(amf_ue);
146
+ ogs_expect(r == OGS_OK);
147
+ ogs_assert(r != OGS_ERROR);
148
}
149
150
if (amf_ue->next.m_tmsi)
151
152
if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
153
ogs_error("%s gmm_handle_service_request() failed %d",
154
amf_ue->suci, gmm_cause);
155
- ogs_assert(OGS_OK ==
156
- nas_5gs_send_service_reject(amf_ue, gmm_cause));
157
+ r = nas_5gs_send_service_reject(amf_ue, gmm_cause);
158
+ ogs_expect(r == OGS_OK);
159
+ ogs_assert(r != OGS_ERROR);
160
OGS_FSM_TRAN(s, gmm_state_exception);
161
break;
162
}
163
164
if (!AMF_UE_HAVE_SUCI(amf_ue)) {
165
ogs_info("Service request : Unknown UE");
166
- ogs_assert(OGS_OK ==
167
- nas_5gs_send_service_reject(amf_ue,
168
- OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
169
- );
170
+ r = nas_5gs_send_service_reject(amf_ue,
171
+ OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK);
172
+ ogs_expect(r == OGS_OK);
173
+ ogs_assert(r != OGS_ERROR);
174
OGS_FSM_TRAN(s, gmm_state_exception);
175
break;
176
}
177
178
if (!h.integrity_protected || !SECURITY_CONTEXT_IS_VALID(amf_ue)) {
179
ogs_error("No Security Context");
180
- ogs_assert(OGS_OK ==
181
- nas_5gs_send_service_reject(amf_ue,
182
- OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK)
183
- );
184
+ r = nas_5gs_send_service_reject(amf_ue,
185
+ OGS_5GMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK);
186
+ ogs_expect(r == OGS_OK);
187
+ ogs_assert(r != OGS_ERROR);
188
OGS_FSM_TRAN(s, gmm_state_exception);
189
break;
190
}
191
192
if (gmm_cause != OGS_5GMM_CAUSE_REQUEST_ACCEPTED) {
193
ogs_error("%s gmm_handle_service_update() failed %d",
194
amf_ue->suci, gmm_cause);
195
- ogs_assert(OGS_OK ==
196
- nas_5gs_send_service_reject(amf_ue, gmm_cause));
197
+ r = nas_5gs_send_service_reject(amf_ue, gmm_cause);
198
+ ogs_expect(r == OGS_OK);
199
+ ogs_assert(r != OGS_ERROR);
200
OGS_FSM_TRAN(s, gmm_state_exception);
201
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/namf-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/namf-handler.c
Changed
107
1
2
int amf_namf_comm_handle_n1_n2_message_transfer(
3
ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg)
4
{
5
- int status;
6
+ int status, r;
7
8
amf_ue_t *amf_ue = NULL;
9
ran_ue_t *ran_ue = NULL;
10
11
* sm-context-ref is created in 1-CLIENT.
12
* So, the PDU session establishment accpet can be transmitted.
13
*/
14
- ogs_expect(OGS_OK == ngap_send_to_ran_ue(ran_ue, ngapbuf));
15
+ r = ngap_send_to_ran_ue(ran_ue, ngapbuf);
16
+ ogs_expect(r == OGS_OK);
17
+ ogs_assert(r != OGS_ERROR);
18
} else {
19
sess->pdu_session_establishment_accept = ngapbuf;
20
}
21
22
AMF_SESS_STORE_N2_TRANSFER(
23
sess, pdu_session_resource_setup_request, n2buf);
24
25
- ogs_assert(OGS_OK == ngap_send_paging(amf_ue));
26
+ r = ngap_send_paging(amf_ue);
27
+ ogs_expect(r == OGS_OK);
28
+ ogs_assert(r != OGS_ERROR);
29
}
30
31
} else if (CM_CONNECTED(amf_ue)) {
32
- ogs_assert(OGS_OK ==
33
- nas_send_pdu_session_setup_request(sess, NULL, n2buf));
34
+ r = nas_send_pdu_session_setup_request(sess, NULL, n2buf);
35
+ ogs_expect(r == OGS_OK);
36
+ ogs_assert(r != OGS_ERROR);
37
38
} else {
39
40
41
OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMMAND,
42
n1buf, n2buf);
43
44
- ogs_assert(OGS_OK == ngap_send_paging(amf_ue));
45
+ r = ngap_send_paging(amf_ue);
46
+ ogs_expect(r == OGS_OK);
47
+ ogs_assert(r != OGS_ERROR);
48
}
49
50
} else if (CM_CONNECTED(amf_ue)) {
51
- ogs_expect(OGS_OK ==
52
- nas_send_pdu_session_modification_command(sess, n1buf, n2buf));
53
+ r = nas_send_pdu_session_modification_command(sess, n1buf, n2buf);
54
+ ogs_expect(r == OGS_OK);
55
+ ogs_assert(r != OGS_ERROR);
56
57
} else {
58
ogs_fatal("%s Invalid AMF-UE state", amf_ue->supi);
59
60
}
61
62
} else if (CM_CONNECTED(amf_ue)) {
63
- ogs_expect(OGS_OK ==
64
- nas_send_pdu_session_release_command(sess, NULL, n2buf));
65
+ r = nas_send_pdu_session_release_command(sess, NULL, n2buf);
66
+ ogs_expect(r == OGS_OK);
67
+ ogs_assert(r != OGS_ERROR);
68
} else {
69
ogs_fatal("%s Invalid AMF-UE state", amf_ue->supi);
70
ogs_assert_if_reached();
71
72
static int do_network_initiated_de_register(
73
amf_ue_t *amf_ue, OpenAPI_deregistration_reason_e dereg_reason)
74
{
75
+ int r;
76
if ((CM_CONNECTED(amf_ue)) &&
77
(OGS_FSM_CHECK(&amf_ue->sm, gmm_state_registered))) {
78
79
- ogs_assert(OGS_OK ==
80
- nas_5gs_send_de_registration_request(amf_ue, dereg_reason));
81
+ r = nas_5gs_send_de_registration_request(amf_ue, dereg_reason);
82
+ ogs_expect(r == OGS_OK);
83
+ ogs_assert(r != OGS_ERROR);
84
85
amf_sbi_send_release_all_sessions(
86
amf_ue, AMF_NETWORK_INITIATED_DE_REGISTERED);
87
88
ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg)
89
{
90
int status = OGS_SBI_HTTP_STATUS_NO_CONTENT;
91
+ int r;
92
93
amf_ue_t *amf_ue = NULL;
94
95
96
ngapbuf = ngap_build_ue_context_modification_request(amf_ue);
97
ogs_assert(ngapbuf);
98
99
- if (nas_5gs_send_to_gnb(amf_ue, ngapbuf) != OGS_OK)
100
- ogs_error("nas_5gs_send_to_gnb() failed");
101
+ r = nas_5gs_send_to_gnb(amf_ue, ngapbuf);
102
+ ogs_expect(r == OGS_OK);
103
+ ogs_assert(r != OGS_ERROR);
104
}
105
106
cleanup:
107
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/nas-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/nas-path.c
Changed
201
1
2
3
int nas_5gs_send_to_gnb(amf_ue_t *amf_ue, ogs_pkbuf_t *pkbuf)
4
{
5
+ int rv;
6
ogs_assert(pkbuf);
7
8
amf_ue = amf_ue_cycle(amf_ue);
9
if (!amf_ue) {
10
- ogs_warn("UE(amf-ue) context has already been removed");
11
+ ogs_error("UE(amf-ue) context has already been removed");
12
ogs_pkbuf_free(pkbuf);
13
- return OGS_ERROR;
14
+ return OGS_NOTFOUND;
15
}
16
17
- return ngap_send_to_ran_ue(amf_ue->ran_ue, pkbuf);
18
+ rv = ngap_send_to_ran_ue(amf_ue->ran_ue, pkbuf);
19
+ ogs_expect(rv == OGS_OK);
20
+
21
+ return rv;
22
}
23
24
int nas_5gs_send_to_downlink_nas_transport(amf_ue_t *amf_ue, ogs_pkbuf_t *pkbuf)
25
26
27
amf_ue = amf_ue_cycle(amf_ue);
28
if (!amf_ue) {
29
- ogs_warn("UE(amf-ue) context has already been removed");
30
+ ogs_error("UE(amf-ue) context has already been removed");
31
ogs_pkbuf_free(pkbuf);
32
- return OGS_ERROR;
33
+ return OGS_NOTFOUND;
34
}
35
36
ran_ue = ran_ue_cycle(amf_ue->ran_ue);
37
if (!ran_ue) {
38
- ogs_warn("NG context has already been removed");
39
+ ogs_error("NG context has already been removed");
40
ogs_pkbuf_free(pkbuf);
41
- return OGS_ERROR;
42
+ return OGS_NOTFOUND;
43
}
44
45
ngapbuf = ngap_build_downlink_nas_transport(
46
ran_ue, pkbuf, false, false);
47
- ogs_expect_or_return_val(ngapbuf, OGS_ERROR);
48
+ if (!ngapbuf) {
49
+ ogs_error("ngap_build_downlink_nas_transport() failed");
50
+ return OGS_ERROR;
51
+ }
52
53
rv = nas_5gs_send_to_gnb(amf_ue, ngapbuf);
54
ogs_expect(rv == OGS_OK);
55
56
57
ogs_assert(amf_ue);
58
ran_ue = ran_ue_cycle(amf_ue->ran_ue);
59
- ogs_expect_or_return_val(ran_ue, OGS_ERROR);
60
+ if (!ran_ue) {
61
+ ogs_error("NG context has already been removed");
62
+ return OGS_NOTFOUND;
63
+ }
64
65
ogs_debug("%s Registration accept", amf_ue->supi);
66
67
if (amf_ue->next.m_tmsi) {
68
if (amf_ue->t3550.pkbuf) {
69
gmmbuf = amf_ue->t3550.pkbuf;
70
- ogs_expect_or_return_val(gmmbuf, OGS_ERROR);
71
} else {
72
gmmbuf = gmm_build_registration_accept(amf_ue);
73
- ogs_expect_or_return_val(gmmbuf, OGS_ERROR);
74
+ if (!gmmbuf) {
75
+ ogs_error("gmm_build_registration_accept() failed");
76
+ return OGS_ERROR;
77
+ }
78
}
79
80
amf_ue->t3550.pkbuf = ogs_pkbuf_copy(gmmbuf);
81
- ogs_expect_or_return_val(amf_ue->t3550.pkbuf, OGS_ERROR);
82
+ if (!amf_ue->t3550.pkbuf) {
83
+ ogs_error("ogs_pkbuf_copy(amf_ue->t3550.pkbuf) failed");
84
+ return OGS_ERROR;
85
+ }
86
ogs_timer_start(amf_ue->t3550.timer,
87
amf_timer_cfg(AMF_TIMER_T3550)->duration);
88
} else {
89
gmmbuf = gmm_build_registration_accept(amf_ue);
90
- ogs_expect_or_return_val(gmmbuf, OGS_ERROR);
91
+ if (!gmmbuf) {
92
+ ogs_error("gmm_build_registration_accept() failed");
93
+ return OGS_ERROR;
94
+ }
95
}
96
97
/*
98
99
if (ran_ue->initial_context_setup_request_sent == false &&
100
(ran_ue->ue_context_requested == true || transfer_needed == true)) {
101
ngapbuf = ngap_ue_build_initial_context_setup_request(amf_ue, gmmbuf);
102
- ogs_expect_or_return_val(ngapbuf, OGS_ERROR);
103
+ if (!ngapbuf) {
104
+ ogs_error("ngap_ue_build_initial_context_setup_request() failed");
105
+ return OGS_ERROR;
106
+ }
107
108
rv = nas_5gs_send_to_gnb(amf_ue, ngapbuf);
109
- ogs_expect_or_return_val(rv == OGS_OK, OGS_ERROR);
110
+ ogs_expect(rv == OGS_OK);
111
112
ran_ue->initial_context_setup_request_sent = true;
113
} else {
114
if (transfer_needed == true) {
115
ngapbuf = ngap_ue_build_pdu_session_resource_setup_request(
116
amf_ue, gmmbuf);
117
- ogs_expect_or_return_val(ngapbuf, OGS_ERROR);
118
+ if (!ngapbuf) {
119
+ ogs_error("ngap_ue_build_pdu_session_resource_setup_request()"
120
+ " failed");
121
+ return OGS_ERROR;
122
+ }
123
124
rv = nas_5gs_send_to_gnb(amf_ue, ngapbuf);
125
- ogs_expect_or_return_val(rv == OGS_OK, OGS_ERROR);
126
+ ogs_expect(rv == OGS_OK);
127
} else {
128
ngapbuf = ngap_build_downlink_nas_transport(
129
ran_ue, gmmbuf, true, true);
130
- ogs_expect_or_return_val(ngapbuf, OGS_ERROR);
131
+ if (!ngapbuf) {
132
+ ogs_error("ngap_build_downlink_nas_transport() failed");
133
+ return OGS_ERROR;
134
+ }
135
136
rv = nas_5gs_send_to_gnb(amf_ue, ngapbuf);
137
- ogs_expect_or_return_val(rv == OGS_OK, OGS_ERROR);
138
+ ogs_expect(rv == OGS_OK);
139
}
140
}
141
142
- return OGS_OK;
143
+ return rv;
144
}
145
146
int nas_5gs_send_registration_reject(
147
148
ogs_warn("%s Registration reject %d", amf_ue->suci, gmm_cause);
149
150
gmmbuf = gmm_build_registration_reject(gmm_cause);
151
- ogs_expect_or_return_val(gmmbuf, OGS_ERROR);
152
+ if (!gmmbuf) {
153
+ ogs_error("gmm_build_registration_reject() failed");
154
+ return OGS_ERROR;
155
+ }
156
157
rv = nas_5gs_send_to_downlink_nas_transport(amf_ue, gmmbuf);
158
ogs_expect(rv == OGS_OK);
159
160
161
ogs_assert(amf_ue);
162
ran_ue = ran_ue_cycle(amf_ue->ran_ue);
163
- ogs_expect_or_return_val(ran_ue, OGS_ERROR);
164
+ if (!ran_ue) {
165
+ ogs_error("NG context has already been removed");
166
+ return OGS_NOTFOUND;
167
+ }
168
169
ogs_debug("%s Service accept", amf_ue->supi);
170
171
gmmbuf = gmm_build_service_accept(amf_ue);
172
- ogs_expect_or_return_val(gmmbuf, OGS_ERROR);
173
+ if (!gmmbuf) {
174
+ ogs_error("gmm_build_registration_reject() failed");
175
+ return OGS_ERROR;
176
+ }
177
178
/*
179
* Previously, AMF would sends PDUSessionResourceSetupRequest
180
181
if (ran_ue->initial_context_setup_request_sent == false &&
182
(ran_ue->ue_context_requested == true || transfer_needed == true)) {
183
ngapbuf = ngap_ue_build_initial_context_setup_request(amf_ue, gmmbuf);
184
- ogs_expect_or_return_val(ngapbuf, OGS_ERROR);
185
+ if (!ngapbuf) {
186
+ ogs_error("ngap_ue_build_initial_context_setup_request() failed");
187
+ return OGS_ERROR;
188
+ }
189
190
rv = nas_5gs_send_to_gnb(amf_ue, ngapbuf);
191
- ogs_expect_or_return_val(rv == OGS_OK, OGS_ERROR);
192
+ ogs_expect(rv == OGS_OK);
193
194
ran_ue->initial_context_setup_request_sent = true;
195
} else {
196
if (transfer_needed == true) {
197
ngapbuf = ngap_ue_build_pdu_session_resource_setup_request(
198
amf_ue, gmmbuf);
199
- ogs_expect_or_return_val(ngapbuf, OGS_ERROR);
200
+ if (!ngapbuf) {
201
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/nausf-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/nausf-handler.c
Changed
21
1
2
int amf_nausf_auth_handle_authenticate(
3
amf_ue_t *amf_ue, ogs_sbi_message_t *message)
4
{
5
+ int r;
6
OpenAPI_ue_authentication_ctx_t *UeAuthenticationCtx = NULL;
7
OpenAPI_av5g_aka_t *AV5G_AKA = NULL;
8
OpenAPI_links_value_schema_t *LinksValueSchemeValue = NULL;
9
10
11
amf_ue->nas.ue.ksi = amf_ue->nas.amf.ksi;
12
13
- ogs_assert(OGS_OK ==
14
- nas_5gs_send_authentication_request(amf_ue));
15
+ r = nas_5gs_send_authentication_request(amf_ue);
16
+ ogs_expect(r == OGS_OK);
17
+ ogs_assert(r != OGS_ERROR);
18
19
return OGS_OK;
20
}
21
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/ngap-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/ngap-handler.c
Changed
201
1
2
void ngap_handle_ng_setup_request(amf_gnb_t *gnb, ogs_ngap_message_t *message)
3
{
4
char bufOGS_ADDRSTRLEN;
5
- int i, j, k;
6
+ int i, j, k, r;
7
8
NGAP_InitiatingMessage_t *initiatingMessage = NULL;
9
NGAP_NGSetupRequest_t *NGSetupRequest = NULL;
10
11
ogs_error("No GlobalRANNodeID");
12
group = NGAP_Cause_PR_protocol;
13
cause = NGAP_CauseProtocol_semantic_error;
14
- ogs_assert(OGS_OK ==
15
- ngap_send_ng_setup_failure(gnb, group, cause));
16
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
17
+ ogs_expect(r == OGS_OK);
18
+ ogs_assert(r != OGS_ERROR);
19
return;
20
}
21
22
23
ogs_error("No globalGNB_ID");
24
group = NGAP_Cause_PR_protocol;
25
cause = NGAP_CauseProtocol_semantic_error;
26
- ogs_assert(OGS_OK ==
27
- ngap_send_ng_setup_failure(gnb, group, cause));
28
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
29
+ ogs_expect(r == OGS_OK);
30
+ ogs_assert(r != OGS_ERROR);
31
return;
32
}
33
34
35
ogs_error("No SupportedTAList");
36
group = NGAP_Cause_PR_protocol;
37
cause = NGAP_CauseProtocol_semantic_error;
38
- ogs_assert(OGS_OK ==
39
- ngap_send_ng_setup_failure(gnb, group, cause));
40
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
41
+ ogs_expect(r == OGS_OK);
42
+ ogs_assert(r != OGS_ERROR);
43
return;
44
}
45
46
47
ogs_error("No SupportedTAItem");
48
group = NGAP_Cause_PR_protocol;
49
cause = NGAP_CauseProtocol_semantic_error;
50
- ogs_assert(OGS_OK ==
51
- ngap_send_ng_setup_failure(gnb, group, cause));
52
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
53
+ ogs_expect(r == OGS_OK);
54
+ ogs_assert(r != OGS_ERROR);
55
return;
56
}
57
58
59
ogs_error("No BroadcastPLMNItem");
60
group = NGAP_Cause_PR_protocol;
61
cause = NGAP_CauseProtocol_semantic_error;
62
- ogs_assert(OGS_OK ==
63
- ngap_send_ng_setup_failure(gnb, group, cause));
64
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
65
+ ogs_expect(r == OGS_OK);
66
+ ogs_assert(r != OGS_ERROR);
67
return;
68
}
69
70
71
ogs_error("No SliceSupportItem");
72
group = NGAP_Cause_PR_protocol;
73
cause = NGAP_CauseProtocol_semantic_error;
74
- ogs_assert(OGS_OK ==
75
- ngap_send_ng_setup_failure(gnb, group, cause));
76
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
77
+ ogs_expect(r == OGS_OK);
78
+ ogs_assert(r != OGS_ERROR);
79
return;
80
}
81
82
83
group = NGAP_Cause_PR_misc;
84
cause = NGAP_CauseMisc_control_processing_overload;
85
86
- ogs_assert(OGS_OK ==
87
- ngap_send_ng_setup_failure(gnb, group, cause));
88
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
89
+ ogs_expect(r == OGS_OK);
90
+ ogs_assert(r != OGS_ERROR);
91
return;
92
}
93
94
95
group = NGAP_Cause_PR_protocol;
96
cause = NGAP_CauseProtocol_message_not_compatible_with_receiver_state;
97
98
- ogs_assert(OGS_OK ==
99
- ngap_send_ng_setup_failure(gnb, group, cause));
100
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
101
+ ogs_expect(r == OGS_OK);
102
+ ogs_assert(r != OGS_ERROR);
103
return;
104
}
105
106
107
group = NGAP_Cause_PR_misc;
108
cause = NGAP_CauseMisc_unknown_PLMN_or_SNPN;
109
110
- ogs_assert(OGS_OK ==
111
- ngap_send_ng_setup_failure(gnb, group, cause));
112
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
113
+ ogs_expect(r == OGS_OK);
114
+ ogs_assert(r != OGS_ERROR);
115
return;
116
}
117
118
119
group = NGAP_Cause_PR_radioNetwork;
120
cause = NGAP_CauseRadioNetwork_slice_not_supported;
121
122
- ogs_assert(OGS_OK ==
123
- ngap_send_ng_setup_failure(gnb, group, cause));
124
+ r = ngap_send_ng_setup_failure(gnb, group, cause);
125
+ ogs_expect(r == OGS_OK);
126
+ ogs_assert(r != OGS_ERROR);
127
return;
128
}
129
130
amf_gnb_set_gnb_id(gnb, gnb_id);
131
132
gnb->state.ng_setup_success = true;
133
- ogs_assert(OGS_OK ==
134
- ngap_send_ng_setup_response(gnb));
135
+ r = ngap_send_ng_setup_response(gnb);
136
+ ogs_expect(r == OGS_OK);
137
+ ogs_assert(r != OGS_ERROR);
138
}
139
140
void ngap_handle_initial_ue_message(amf_gnb_t *gnb, ogs_ngap_message_t *message)
141
{
142
- int i;
143
+ int i, r;
144
char bufOGS_ADDRSTRLEN;
145
146
ran_ue_t *ran_ue = NULL;
147
148
149
if (!RAN_UE_NGAP_ID) {
150
ogs_error("No RAN_UE_NGAP_ID");
151
- ogs_assert(OGS_OK ==
152
- ngap_send_error_indication(gnb, NULL, NULL,
153
- NGAP_Cause_PR_protocol, NGAP_CauseProtocol_semantic_error));
154
+ r = ngap_send_error_indication(gnb, NULL, NULL,
155
+ NGAP_Cause_PR_protocol, NGAP_CauseProtocol_semantic_error);
156
+ ogs_expect(r == OGS_OK);
157
+ ogs_assert(r != OGS_ERROR);
158
return;
159
}
160
161
162
if (!ran_ue) {
163
ran_ue = ran_ue_add(gnb, *RAN_UE_NGAP_ID);
164
if (ran_ue == NULL) {
165
- ogs_assert(OGS_OK ==
166
- ngap_send_error_indication(gnb, NULL, NULL,
167
+ r = ngap_send_error_indication(gnb, NULL, NULL,
168
NGAP_Cause_PR_misc,
169
- NGAP_CauseMisc_control_processing_overload));
170
+ NGAP_CauseMisc_control_processing_overload);
171
+ ogs_expect(r == OGS_OK);
172
+ ogs_assert(r != OGS_ERROR);
173
return;
174
}
175
176
177
/* De-associate NG with NAS/EMM */
178
ran_ue_deassociate(amf_ue->ran_ue);
179
180
- ogs_assert(OGS_OK ==
181
- ngap_send_ran_ue_context_release_command(amf_ue->ran_ue,
182
+ r = ngap_send_ran_ue_context_release_command(
183
+ amf_ue->ran_ue,
184
NGAP_Cause_PR_nas, NGAP_CauseNas_normal_release,
185
- NGAP_UE_CTX_REL_NG_CONTEXT_REMOVE, 0));
186
+ NGAP_UE_CTX_REL_NG_CONTEXT_REMOVE, 0);
187
+ ogs_expect(r == OGS_OK);
188
+ ogs_assert(r != OGS_ERROR);
189
}
190
amf_ue_associate_ran_ue(amf_ue, ran_ue);
191
192
193
194
if (!UserLocationInformation) {
195
ogs_error("No UserLocationInformation");
196
- ogs_assert(OGS_OK ==
197
- ngap_send_error_indication(gnb, &ran_ue->ran_ue_ngap_id, NULL,
198
- NGAP_Cause_PR_protocol, NGAP_CauseProtocol_semantic_error));
199
+ r = ngap_send_error_indication(gnb, &ran_ue->ran_ue_ngap_id, NULL,
200
+ NGAP_Cause_PR_protocol, NGAP_CauseProtocol_semantic_error);
201
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/ngap-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/ngap-path.c
Changed
201
1
2
3
gnb = amf_gnb_cycle(gnb);
4
if (!gnb) {
5
- ogs_warn("gNB has already been removed");
6
+ ogs_error("gNB has already been removed");
7
ogs_pkbuf_free(pkbuf);
8
- return OGS_ERROR;
9
+ return OGS_NOTFOUND;
10
}
11
12
ogs_assert(gnb->sctp.sock);
13
if (gnb->sctp.sock->fd == INVALID_SOCKET) {
14
- ogs_fatal("gNB SCTP socket has already been destroyed");
15
+ ogs_error("gNB SCTP socket has already been destroyed");
16
ogs_log_hexdump(OGS_LOG_FATAL, pkbuf->data, pkbuf->len);
17
- ogs_assert_if_reached();
18
+ ogs_pkbuf_free(pkbuf);
19
return OGS_ERROR;
20
}
21
22
23
24
int ngap_send_to_ran_ue(ran_ue_t *ran_ue, ogs_pkbuf_t *pkbuf)
25
{
26
+ int rv;
27
ogs_assert(pkbuf);
28
29
ran_ue = ran_ue_cycle(ran_ue);
30
if (!ran_ue) {
31
- ogs_warn("NG context has already been removed");
32
+ ogs_error("NG context has already been removed");
33
ogs_pkbuf_free(pkbuf);
34
- return OGS_ERROR;
35
+ return OGS_NOTFOUND;
36
}
37
38
- return ngap_send_to_gnb(ran_ue->gnb, pkbuf, ran_ue->gnb_ostream_id);
39
+ rv = ngap_send_to_gnb(ran_ue->gnb, pkbuf, ran_ue->gnb_ostream_id);
40
+ ogs_expect(rv == OGS_OK);
41
+
42
+ return rv;
43
}
44
45
int ngap_delayed_send_to_ran_ue(
46
47
48
return OGS_OK;
49
} else {
50
- amf_gnb_t *gnb = NULL;
51
- gnb = ran_ue->gnb;
52
- ogs_assert(gnb);
53
- return ngap_send_to_ran_ue(ran_ue, pkbuf);
54
+ int rv = ngap_send_to_ran_ue(ran_ue, pkbuf);
55
+ ogs_expect(rv == OGS_OK);
56
+
57
+ return rv;
58
}
59
}
60
61
62
int ngap_send_to_nas(ran_ue_t *ran_ue,
63
NGAP_ProcedureCode_t procedureCode, NGAP_NAS_PDU_t *nasPdu)
64
{
65
+ int rv;
66
+
67
ogs_nas_5gs_security_header_t *sh = NULL;
68
ogs_nas_security_header_type_t security_header_type;
69
70
71
ogs_assert(h);
72
if (h->extended_protocol_discriminator ==
73
OGS_NAS_EXTENDED_PROTOCOL_DISCRIMINATOR_5GMM) {
74
- int rv;
75
e = amf_event_new(AMF_EVENT_5GMM_MESSAGE);
76
if (!e) {
77
ogs_error("ngap_send_to_nas() failed");
78
79
ogs_pkbuf_free(nasbuf);
80
return OGS_ERROR;
81
}
82
- return ngap_send_to_5gsm(amf_ue, nasbuf);
83
+ rv = ngap_send_to_5gsm(amf_ue, nasbuf);
84
+ ogs_expect(rv == OGS_OK);
85
+
86
+ return rv;
87
} else {
88
ogs_error("Unknown NAS Protocol discriminator 0x%02x",
89
h->extended_protocol_discriminator);
90
91
92
ogs_debug("NG-Setup response");
93
ngap_buffer = ngap_build_ng_setup_response();
94
- ogs_expect_or_return_val(ngap_buffer, OGS_ERROR);
95
+ if (!ngap_buffer) {
96
+ ogs_error("ngap_build_ng_setup_response() failed");
97
+ return OGS_ERROR;
98
+ }
99
100
rv = ngap_send_to_gnb(gnb, ngap_buffer, NGAP_NON_UE_SIGNALLING);
101
ogs_expect(rv == OGS_OK);
102
103
ogs_debug("NG-Setup failure");
104
ngap_buffer = ngap_build_ng_setup_failure(
105
group, cause, NGAP_TimeToWait_v10s);
106
- ogs_expect_or_return_val(ngap_buffer, OGS_ERROR);
107
+ if (!ngap_buffer) {
108
+ ogs_error("ngap_build_ng_setup_failure() failed");
109
+ return OGS_ERROR;
110
+ }
111
112
rv = ngap_send_to_gnb(gnb, ngap_buffer, NGAP_NON_UE_SIGNALLING);
113
ogs_expect(rv == OGS_OK);
114
115
116
ogs_debug("RANConfigurationUpdateAcknowledge");
117
ngap_buffer = ngap_build_ran_configuration_update_ack();
118
- ogs_expect_or_return_val(ngap_buffer, OGS_ERROR);
119
+ if (!ngap_buffer) {
120
+ ogs_error("ngap_build_ran_configuration_update_ack() failed");
121
+ return OGS_ERROR;
122
+ }
123
124
rv = ngap_send_to_gnb(gnb, ngap_buffer, NGAP_NON_UE_SIGNALLING);
125
ogs_expect(rv == OGS_OK);
126
127
ogs_debug("RANConfigurationUpdateFailure");
128
ngap_buffer = ngap_build_ran_configuration_update_failure(
129
group, cause, NGAP_TimeToWait_v10s);
130
- ogs_expect_or_return_val(ngap_buffer, OGS_ERROR);
131
+ if (!ngap_buffer) {
132
+ ogs_error("ngap_build_ran_configuration_update_failure() failed");
133
+ return OGS_ERROR;
134
+ }
135
136
rv = ngap_send_to_gnb(gnb, ngap_buffer, NGAP_NON_UE_SIGNALLING);
137
ogs_expect(rv == OGS_OK);
138
139
group, (int)cause, action, (int)duration);
140
141
ngapbuf = ngap_build_ue_context_release_command(ran_ue, group, cause);
142
- ogs_expect_or_return_val(ngapbuf, OGS_ERROR);
143
+ if (!ngapbuf) {
144
+ ogs_error("ngap_build_ue_context_release_command() failed");
145
+ return OGS_ERROR;
146
+ }
147
148
rv = ngap_delayed_send_to_ran_ue(ran_ue, ngapbuf, duration);
149
ogs_expect(rv == OGS_OK);
150
151
amf_ue_t *amf_ue, NGAP_Cause_PR group, long cause,
152
uint8_t action, ogs_time_t duration)
153
{
154
+ int rv;
155
ogs_assert(amf_ue);
156
157
- ran_ue_t *ran_ue = ran_ue_cycle(amf_ue->ran_ue);
158
- if (ran_ue) {
159
- ogs_assert(OGS_OK ==
160
- ngap_send_ran_ue_context_release_command(ran_ue,
161
- group, cause, action, duration));
162
- ogs_debug(" SUPI%s", amf_ue->supi);
163
- } else {
164
- ogs_error("%s No NG Context - "
165
- "Group%d Cause%d Action%d Duration%d",
166
- amf_ue->supi, group, (int)cause, action, (int)duration);
167
- }
168
+ rv = ngap_send_ran_ue_context_release_command(
169
+ amf_ue->ran_ue, group, cause, action, duration);
170
+ ogs_expect(rv == OGS_OK);
171
+ ogs_debug(" SUPI%s", amf_ue->supi);
172
173
- return OGS_OK;
174
+ return rv;
175
}
176
177
int ngap_send_paging(amf_ue_t *amf_ue)
178
179
ngapbuf = amf_ue->t3513.pkbuf;
180
} else {
181
ngapbuf = ngap_build_paging(amf_ue);
182
- ogs_expect_or_return_val(ngapbuf, OGS_ERROR);
183
+ if (!ngapbuf) {
184
+ ogs_error("ngap_build_paging() failed");
185
+ return OGS_ERROR;
186
+ }
187
}
188
189
amf_ue->t3513.pkbuf = ogs_pkbuf_copy(ngapbuf);
190
- ogs_expect_or_return_val(amf_ue->t3513.pkbuf, OGS_ERROR);
191
+ if (!amf_ue->t3513.pkbuf) {
192
+ ogs_error("ogs_pkbuf_copy() failed");
193
+ return OGS_ERROR;
194
+ }
195
196
rv = ngap_send_to_gnb(gnb, ngapbuf, NGAP_NON_UE_SIGNALLING);
197
- ogs_expect_or_return_val(rv == OGS_OK, rv);
198
+ if (rv != OGS_OK) {
199
+ ogs_error("ngap_send_to_gnb() failed");
200
+ return rv;
201
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/ngap-path.h -> open5gs_2.5.5.101.6895.tar.xz/src/amf/ngap-path.h
Changed
10
1
2
3
ogs_sock_t *ngap_server(ogs_socknode_t *node);
4
void ngap_recv_upcall(short when, ogs_socket_t fd, void *data);
5
-int ngap_send(ogs_sock_t *sock,
6
- ogs_pkbuf_t *pkbuf, ogs_sockaddr_t *addr, uint16_t stream_no);
7
8
int ngap_send_to_gnb(
9
amf_gnb_t *gnb, ogs_pkbuf_t *pkb, uint16_t stream_no);
10
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/ngap-sm.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/ngap-sm.c
Changed
22
1
2
3
void ngap_state_operational(ogs_fsm_t *s, amf_event_t *e)
4
{
5
+ int r;
6
+
7
amf_gnb_t *gnb = NULL;
8
ogs_pkbuf_t *pkbuf = NULL;
9
10
11
ogs_assert(e->ran_ue);
12
ogs_assert(e->pkbuf);
13
14
- ogs_expect(OGS_OK == ngap_send_to_ran_ue(e->ran_ue, e->pkbuf));
15
+ r = ngap_send_to_ran_ue(e->ran_ue, e->pkbuf);
16
+ ogs_expect(r == OGS_OK);
17
+ ogs_assert(r != OGS_ERROR);
18
+
19
ogs_timer_delete(e->timer);
20
break;
21
default:
22
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/nnrf-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/nnrf-handler.c
Changed
48
1
2
void amf_nnrf_handle_nf_discover(
3
ogs_sbi_xact_t *xact, ogs_sbi_message_t *recvmsg)
4
{
5
+ int r;
6
+
7
ogs_sbi_nf_instance_t *nf_instance = NULL;
8
ogs_sbi_object_t *sbi_object = NULL;
9
ogs_sbi_service_type_e service_type = OGS_SBI_SERVICE_TYPE_NULL;
10
11
ogs_assert(amf_ue);
12
ogs_error("%s (NF discover) No %s", amf_ue->suci,
13
ogs_sbi_service_type_to_name(service_type));
14
- ogs_assert(OGS_OK ==
15
- nas_5gs_send_gmm_reject_from_sbi(amf_ue,
16
- OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT));
17
+ r = nas_5gs_send_gmm_reject_from_sbi(amf_ue,
18
+ OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT);
19
+ ogs_expect(r == OGS_OK);
20
+ ogs_assert(r != OGS_ERROR);
21
break;
22
case OGS_SBI_OBJ_SESS_TYPE:
23
sess = (amf_sess_t *)sbi_object;
24
25
ogs_error("%d:%d (NF discover) No %s", sess->psi, sess->pti,
26
ogs_sbi_service_type_to_name(service_type));
27
if (sess->payload_container_type) {
28
- ogs_assert(OGS_OK ==
29
- nas_5gs_send_back_gsm_message(sess,
30
+ r = nas_5gs_send_back_gsm_message(sess,
31
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
32
- AMF_NAS_BACKOFF_TIME));
33
+ AMF_NAS_BACKOFF_TIME);
34
+ ogs_expect(r == OGS_OK);
35
+ ogs_assert(r != OGS_ERROR);
36
} else {
37
- ogs_assert(OGS_OK ==
38
- ngap_send_error_indication2(amf_ue,
39
+ r = ngap_send_error_indication2(amf_ue,
40
NGAP_Cause_PR_transport,
41
- NGAP_CauseTransport_transport_resource_unavailable));
42
+ NGAP_CauseTransport_transport_resource_unavailable);
43
+ ogs_expect(r == OGS_OK);
44
+ ogs_assert(r != OGS_ERROR);
45
}
46
break;
47
default:
48
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/nnssf-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/nnssf-handler.c
Changed
73
1
2
amf_sess_t *sess, ogs_sbi_message_t *recvmsg)
3
{
4
bool rc;
5
+ int r;
6
OpenAPI_uri_scheme_e scheme = OpenAPI_uri_scheme_NULL;
7
ogs_sbi_client_t *client = NULL, *scp_client = NULL;
8
ogs_sockaddr_t *addr = NULL;
9
10
if (recvmsg->res_status != OGS_SBI_HTTP_STATUS_OK) {
11
ogs_error("%s HTTP response error %d",
12
amf_ue->supi, recvmsg->res_status);
13
- ogs_assert(OGS_OK ==
14
- nas_5gs_send_gmm_status(amf_ue, recvmsg->res_status));
15
+ r = nas_5gs_send_gmm_status(amf_ue, recvmsg->res_status);
16
+ ogs_expect(r == OGS_OK);
17
+ ogs_assert(r != OGS_ERROR);
18
return OGS_ERROR;
19
}
20
21
AuthorizedNetworkSliceInfo = recvmsg->AuthorizedNetworkSliceInfo;
22
if (!AuthorizedNetworkSliceInfo) {
23
ogs_error("No AuthorizedNetworkSliceInfo");
24
- ogs_assert(OGS_OK ==
25
- nas_5gs_send_gmm_reject_from_sbi(
26
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
27
+ r = nas_5gs_send_gmm_reject_from_sbi(
28
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
29
+ ogs_expect(r == OGS_OK);
30
+ ogs_assert(r != OGS_ERROR);
31
return OGS_ERROR;
32
}
33
34
NsiInformation = AuthorizedNetworkSliceInfo->nsi_information;
35
if (!NsiInformation) {
36
ogs_error("No NsiInformation");
37
- ogs_assert(OGS_OK ==
38
- nas_5gs_send_gmm_reject_from_sbi(
39
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
40
+ r = nas_5gs_send_gmm_reject_from_sbi(
41
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
42
+ ogs_expect(r == OGS_OK);
43
+ ogs_assert(r != OGS_ERROR);
44
return OGS_ERROR;
45
}
46
47
if (!NsiInformation->nrf_id) {
48
ogs_error("No nrfId");
49
- ogs_assert(OGS_OK ==
50
- nas_5gs_send_gmm_reject_from_sbi(
51
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
52
+ r = nas_5gs_send_gmm_reject_from_sbi(
53
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
54
+ ogs_expect(r == OGS_OK);
55
+ ogs_assert(r != OGS_ERROR);
56
return OGS_ERROR;
57
}
58
59
60
if (rc == false || scheme == OpenAPI_uri_scheme_NULL) {
61
ogs_error("%s:%d Invalid URI %s",
62
amf_ue->supi, sess->psi, NsiInformation->nrf_id);
63
- ogs_assert(OGS_OK ==
64
- nas_5gs_send_gmm_reject_from_sbi(
65
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
66
+ r = nas_5gs_send_gmm_reject_from_sbi(
67
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
68
+ ogs_expect(r == OGS_OK);
69
+ ogs_assert(r != OGS_ERROR);
70
return OGS_ERROR;;
71
}
72
73
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/npcf-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/npcf-handler.c
Changed
87
1
2
int amf_npcf_am_policy_control_handle_create(
3
amf_ue_t *amf_ue, ogs_sbi_message_t *recvmsg)
4
{
5
- int rv;
6
+ int r, rv;
7
8
uint64_t supported_features;
9
10
11
if (recvmsg->res_status != OGS_SBI_HTTP_STATUS_CREATED) {
12
ogs_error("%s HTTP response error %d",
13
amf_ue->supi, recvmsg->res_status);
14
- ogs_assert(OGS_OK ==
15
- nas_5gs_send_gmm_reject_from_sbi(amf_ue, recvmsg->res_status));
16
+ r = nas_5gs_send_gmm_reject_from_sbi(amf_ue, recvmsg->res_status);
17
+ ogs_expect(r == OGS_OK);
18
+ ogs_assert(r != OGS_ERROR);
19
return OGS_ERROR;
20
}
21
22
if (!recvmsg->http.location) {
23
ogs_error("%s No http.location", amf_ue->supi);
24
- ogs_assert(OGS_OK ==
25
- nas_5gs_send_gmm_reject_from_sbi(
26
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
27
+ r = nas_5gs_send_gmm_reject_from_sbi(
28
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
29
+ ogs_expect(r == OGS_OK);
30
+ ogs_assert(r != OGS_ERROR);
31
return OGS_ERROR;
32
}
33
34
PolicyAssociation = recvmsg->PolicyAssociation;
35
if (!PolicyAssociation) {
36
ogs_error("No PolicyAssociation");
37
- ogs_assert(OGS_OK ==
38
- nas_5gs_send_gmm_reject_from_sbi(
39
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
40
+ r = nas_5gs_send_gmm_reject_from_sbi(
41
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
42
+ ogs_expect(r == OGS_OK);
43
+ ogs_assert(r != OGS_ERROR);
44
return OGS_ERROR;
45
}
46
47
if (!PolicyAssociation->supp_feat) {
48
ogs_error("No suppFeat");
49
- ogs_assert(OGS_OK ==
50
- nas_5gs_send_gmm_reject_from_sbi(
51
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
52
+ r = nas_5gs_send_gmm_reject_from_sbi(
53
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
54
+ ogs_expect(r == OGS_OK);
55
+ ogs_assert(r != OGS_ERROR);
56
return OGS_ERROR;
57
}
58
59
60
if (rv != OGS_OK) {
61
ogs_error("%s Cannot parse http.location %s",
62
amf_ue->supi, recvmsg->http.location);
63
- ogs_assert(OGS_OK ==
64
- nas_5gs_send_gmm_reject_from_sbi(
65
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
66
+ r = nas_5gs_send_gmm_reject_from_sbi(
67
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
68
+ ogs_expect(r == OGS_OK);
69
+ ogs_assert(r != OGS_ERROR);
70
return OGS_ERROR;
71
}
72
73
74
amf_ue->supi, recvmsg->http.location);
75
76
ogs_sbi_header_free(&header);
77
- ogs_assert(OGS_OK ==
78
- nas_5gs_send_gmm_reject_from_sbi(
79
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
80
+ r = nas_5gs_send_gmm_reject_from_sbi(
81
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
82
+ ogs_expect(r == OGS_OK);
83
+ ogs_assert(r != OGS_ERROR);
84
return OGS_ERROR;
85
}
86
87
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/nsmf-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/nsmf-handler.c
Changed
201
1
2
int amf_nsmf_pdusession_handle_create_sm_context(
3
amf_sess_t *sess, ogs_sbi_message_t *recvmsg)
4
{
5
- int rv;
6
+ int rv, r;
7
8
ogs_assert(sess);
9
ogs_assert(recvmsg);
10
11
12
if (!recvmsg->http.location) {
13
ogs_error("%d:%d No http.location", sess->psi, sess->pti);
14
- ogs_assert(OGS_OK ==
15
- nas_5gs_send_back_gsm_message(sess,
16
+ r = nas_5gs_send_back_gsm_message(sess,
17
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
18
- AMF_NAS_BACKOFF_TIME));
19
+ AMF_NAS_BACKOFF_TIME);
20
+ ogs_expect(r == OGS_OK);
21
+ ogs_assert(r != OGS_ERROR);
22
23
return OGS_ERROR;
24
}
25
26
if (rv != OGS_OK) {
27
ogs_error("%d:%d Cannot parse http.location %s",
28
sess->psi, sess->pti, recvmsg->http.location);
29
- ogs_assert(OGS_OK ==
30
- nas_5gs_send_back_gsm_message(sess,
31
+ r = nas_5gs_send_back_gsm_message(sess,
32
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
33
- AMF_NAS_BACKOFF_TIME));
34
+ AMF_NAS_BACKOFF_TIME);
35
+ ogs_expect(r == OGS_OK);
36
+ ogs_assert(r != OGS_ERROR);
37
38
return OGS_ERROR;
39
}
40
41
sess->psi, sess->pti, recvmsg->http.location);
42
43
ogs_sbi_header_free(&header);
44
- ogs_assert(OGS_OK ==
45
- nas_5gs_send_back_gsm_message(sess,
46
+ r = nas_5gs_send_back_gsm_message(sess,
47
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
48
- AMF_NAS_BACKOFF_TIME));
49
+ AMF_NAS_BACKOFF_TIME);
50
+ ogs_expect(r == OGS_OK);
51
+ ogs_assert(r != OGS_ERROR);
52
53
return OGS_ERROR;
54
}
55
56
amf_ue_t *amf_ue = sess->amf_ue;
57
ogs_assert(amf_ue);
58
59
- rv = nas_5gs_send_to_gnb(amf_ue,
60
+ r = nas_5gs_send_to_gnb(amf_ue,
61
sess->pdu_session_establishment_accept);
62
63
sess->pdu_session_establishment_accept = NULL;
64
65
sess->psi, sess->pti);
66
67
ogs_sbi_header_free(&header);
68
- ogs_assert(OGS_OK ==
69
- nas_5gs_send_back_gsm_message(sess,
70
+ r = nas_5gs_send_back_gsm_message(sess,
71
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
72
- AMF_NAS_BACKOFF_TIME));
73
+ AMF_NAS_BACKOFF_TIME);
74
+ ogs_expect(r == OGS_OK);
75
+ ogs_assert(r != OGS_ERROR);
76
77
return OGS_ERROR;
78
}
79
80
SmContextCreateError = recvmsg->SmContextCreateError;
81
if (!SmContextCreateError) {
82
ogs_error("%d:%d No SmContextCreateError", sess->psi, sess->pti);
83
- ogs_assert(OGS_OK ==
84
- nas_5gs_send_back_gsm_message(sess,
85
+ r = nas_5gs_send_back_gsm_message(sess,
86
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
87
- AMF_NAS_BACKOFF_TIME));
88
+ AMF_NAS_BACKOFF_TIME);
89
+ ogs_expect(r == OGS_OK);
90
+ ogs_assert(r != OGS_ERROR);
91
92
return OGS_ERROR;
93
}
94
if (!SmContextCreateError->error) {
95
ogs_error("%d:%d No Error", sess->psi, sess->pti);
96
- ogs_assert(OGS_OK ==
97
- nas_5gs_send_back_gsm_message(sess,
98
+ r = nas_5gs_send_back_gsm_message(sess,
99
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
100
- AMF_NAS_BACKOFF_TIME));
101
+ AMF_NAS_BACKOFF_TIME);
102
+ ogs_expect(r == OGS_OK);
103
+ ogs_assert(r != OGS_ERROR);
104
105
return OGS_ERROR;
106
}
107
108
sess->psi, sess->pti);
109
n1smbuf = ogs_pkbuf_copy(n1smbuf);
110
ogs_assert(n1smbuf);
111
- ogs_assert(OGS_OK ==
112
- nas_5gs_send_gsm_reject(sess,
113
- OGS_NAS_PAYLOAD_CONTAINER_N1_SM_INFORMATION, n1smbuf));
114
+ r = nas_5gs_send_gsm_reject(sess,
115
+ OGS_NAS_PAYLOAD_CONTAINER_N1_SM_INFORMATION, n1smbuf);
116
+ ogs_expect(r == OGS_OK);
117
+ ogs_assert(r != OGS_ERROR);
118
119
return OGS_ERROR;
120
}
121
}
122
123
ogs_error("%d:%d 5GMM was not forwarded", sess->psi, sess->pti);
124
- ogs_assert(OGS_OK ==
125
- nas_5gs_send_back_gsm_message(sess,
126
+ r = nas_5gs_send_back_gsm_message(sess,
127
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
128
- AMF_NAS_BACKOFF_TIME));
129
+ AMF_NAS_BACKOFF_TIME);
130
+ ogs_expect(r == OGS_OK);
131
+ ogs_assert(r != OGS_ERROR);
132
133
return OGS_ERROR;
134
}
135
136
int amf_nsmf_pdusession_handle_update_sm_context(
137
amf_sess_t *sess, int state, ogs_sbi_message_t *recvmsg)
138
{
139
+ int r;
140
+
141
amf_ue_t *amf_ue = NULL;
142
ran_ue_t *ran_ue = NULL;
143
144
145
amf_ue, 0, NULL));
146
} else {
147
CLEAR_AMF_UE_TIMER(amf_ue->t3550);
148
- ogs_assert(OGS_OK ==
149
- nas_5gs_send_registration_accept(amf_ue));
150
+ r = nas_5gs_send_registration_accept(amf_ue);
151
+ ogs_expect(r == OGS_OK);
152
+ ogs_assert(r != OGS_ERROR);
153
154
AMF_UE_CLEAR_N2_TRANSFER(
155
amf_ue, pdu_session_resource_setup_request);
156
157
AMF_RELEASE_SM_CONTEXT_SERVICE_ACCEPT) &&
158
AMF_SESSION_SYNC_DONE(amf_ue,
159
AMF_UPDATE_SM_CONTEXT_SERVICE_REQUEST)) {
160
- ogs_assert(OGS_OK ==
161
- nas_5gs_send_service_accept(amf_ue));
162
+ r = nas_5gs_send_service_accept(amf_ue);
163
+ ogs_expect(r == OGS_OK);
164
+ ogs_assert(r != OGS_ERROR);
165
166
AMF_UE_CLEAR_N2_TRANSFER(
167
amf_ue, pdu_session_resource_setup_request);
168
169
170
if (AMF_SESSION_SYNC_DONE(amf_ue,
171
AMF_UPDATE_SM_CONTEXT_HANDOVER_REQUIRED)) {
172
- ogs_assert(OGS_OK ==
173
- ngap_send_handover_request(amf_ue));
174
+ r = ngap_send_handover_request(amf_ue);
175
+ ogs_expect(r == OGS_OK);
176
+ ogs_assert(r != OGS_ERROR);
177
178
AMF_UE_CLEAR_N2_TRANSFER(amf_ue, handover_request);
179
}
180
181
if (!n1smbuf) {
182
ogs_error("%s:%d No N1 SM Content %s",
183
amf_ue->supi, sess->psi, n1SmMsg->content_id);
184
- ogs_assert(OGS_OK ==
185
- nas_5gs_send_back_gsm_message(sess,
186
+ r = nas_5gs_send_back_gsm_message(sess,
187
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
188
- AMF_NAS_BACKOFF_TIME));
189
+ AMF_NAS_BACKOFF_TIME);
190
+ ogs_expect(r == OGS_OK);
191
+ ogs_assert(r != OGS_ERROR);
192
193
return OGS_ERROR;
194
}
195
196
if (!n2smbuf) {
197
ogs_error("%s:%d No N2 SM Content",
198
amf_ue->supi, sess->psi);
199
- ogs_assert(OGS_OK ==
200
- nas_5gs_send_back_gsm_message(sess,
201
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/nudm-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/nudm-handler.c
Changed
52
1
2
int amf_nudm_sdm_handle_provisioned(
3
amf_ue_t *amf_ue, int state, ogs_sbi_message_t *recvmsg)
4
{
5
- int i;
6
+ int i, r;
7
8
ogs_assert(amf_ue);
9
ogs_assert(recvmsg);
10
11
12
if (!recvmsg->http.location) {
13
ogs_error("%s No http.location", amf_ue->supi);
14
- ogs_assert(OGS_OK ==
15
- nas_5gs_send_gmm_reject_from_sbi(
16
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
17
+ r = nas_5gs_send_gmm_reject_from_sbi(
18
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
19
+ ogs_expect(r == OGS_OK);
20
+ ogs_assert(r != OGS_ERROR);
21
return OGS_ERROR;
22
}
23
24
25
if (rv != OGS_OK) {
26
ogs_error("%s Cannot parse http.location %s",
27
amf_ue->supi, recvmsg->http.location);
28
- ogs_assert(OGS_OK ==
29
- nas_5gs_send_gmm_reject_from_sbi(
30
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
31
+ r = nas_5gs_send_gmm_reject_from_sbi(
32
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
33
+ ogs_expect(r == OGS_OK);
34
+ ogs_assert(r != OGS_ERROR);
35
return OGS_ERROR;
36
}
37
38
39
amf_ue->supi, recvmsg->http.location);
40
41
ogs_sbi_header_free(&header);
42
- ogs_assert(OGS_OK ==
43
- nas_5gs_send_gmm_reject_from_sbi(
44
- amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR));
45
+ r = nas_5gs_send_gmm_reject_from_sbi(
46
+ amf_ue, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR);
47
+ ogs_expect(r == OGS_OK);
48
+ ogs_assert(r != OGS_ERROR);
49
return OGS_ERROR;
50
}
51
52
open5gs_2.5.5.100.a8f8.tar.xz/src/amf/sbi-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/amf/sbi-path.c
Changed
165
1
2
ogs_sbi_request_t *(*build)(amf_ue_t *amf_ue, void *data),
3
amf_ue_t *amf_ue, int state, void *data)
4
{
5
+ int r;
6
ogs_sbi_xact_t *xact = NULL;
7
8
ogs_assert(service_type);
9
10
(ogs_sbi_build_f)build, amf_ue, data);
11
if (!xact) {
12
ogs_error("amf_ue_sbi_discover_and_send() failed");
13
- ogs_assert(OGS_OK ==
14
- nas_5gs_send_gmm_reject_from_sbi(
15
- amf_ue, OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT));
16
+ r = nas_5gs_send_gmm_reject_from_sbi(
17
+ amf_ue, OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT);
18
+ ogs_expect(r == OGS_OK);
19
+ ogs_assert(r != OGS_ERROR);
20
return false;
21
}
22
23
24
if (ogs_sbi_discover_and_send(xact) != true) {
25
ogs_error("amf_ue_sbi_discover_and_send() failed");
26
ogs_sbi_xact_remove(xact);
27
- ogs_assert(OGS_OK ==
28
- nas_5gs_send_gmm_reject_from_sbi(
29
- amf_ue, OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT));
30
+ r = nas_5gs_send_gmm_reject_from_sbi(
31
+ amf_ue, OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT);
32
+ ogs_expect(r == OGS_OK);
33
+ ogs_assert(r != OGS_ERROR);
34
return false;
35
}
36
37
38
ogs_sbi_request_t *(*build)(amf_sess_t *sess, void *data),
39
amf_sess_t *sess, int state, void *data)
40
{
41
+ int r;
42
ogs_sbi_xact_t *xact = NULL;
43
44
ogs_assert(service_type);
45
46
(ogs_sbi_build_f)build, sess, data);
47
if (!xact) {
48
ogs_error("amf_sess_sbi_discover_and_send() failed");
49
- ogs_assert(OGS_OK == nas_5gs_send_back_gsm_message(sess,
50
- OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME));
51
+ r = nas_5gs_send_back_gsm_message(sess,
52
+ OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME);
53
+ ogs_expect(r == OGS_OK);
54
+ ogs_assert(r != OGS_ERROR);
55
return false;
56
}
57
58
59
if (ogs_sbi_discover_and_send(xact) != true) {
60
ogs_error("amf_sess_sbi_discover_and_send() failed");
61
ogs_sbi_xact_remove(xact);
62
- ogs_assert(OGS_OK == nas_5gs_send_back_gsm_message(sess,
63
- OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME));
64
+ r = nas_5gs_send_back_gsm_message(sess,
65
+ OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME);
66
+ ogs_expect(r == OGS_OK);
67
+ ogs_assert(r != OGS_ERROR);
68
return false;
69
}
70
71
72
static int client_discover_cb(
73
int status, ogs_sbi_response_t *response, void *data)
74
{
75
- int rv;
76
+ int r, rv;
77
ogs_sbi_message_t message;
78
79
ogs_sbi_xact_t *xact = NULL;
80
81
rv = ogs_sbi_parse_response(&message, response);
82
if (rv != OGS_OK) {
83
ogs_error("cannot parse HTTP response");
84
- ogs_assert(OGS_OK == nas_5gs_send_back_gsm_message(sess,
85
- OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME));
86
+ r = nas_5gs_send_back_gsm_message(sess,
87
+ OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME);
88
+ ogs_expect(r == OGS_OK);
89
+ ogs_assert(r != OGS_ERROR);
90
91
goto cleanup;
92
}
93
94
if (message.res_status != OGS_SBI_HTTP_STATUS_OK) {
95
ogs_error("NF-Discover failed %d", message.res_status);
96
- ogs_assert(OGS_OK == nas_5gs_send_back_gsm_message(sess,
97
- OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME));
98
+ r = nas_5gs_send_back_gsm_message(sess,
99
+ OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME);
100
+ ogs_expect(r == OGS_OK);
101
+ ogs_assert(r != OGS_ERROR);
102
103
goto cleanup;
104
}
105
106
if (!message.SearchResult) {
107
ogs_error("No SearchResult");
108
- ogs_assert(OGS_OK == nas_5gs_send_back_gsm_message(sess,
109
- OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME));
110
+ r = nas_5gs_send_back_gsm_message(sess,
111
+ OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED, AMF_NAS_BACKOFF_TIME);
112
+ ogs_expect(r == OGS_OK);
113
+ ogs_assert(r != OGS_ERROR);
114
115
goto cleanup;
116
}
117
118
ogs_error("%s:%d (NF discover) No %s",
119
amf_ue->supi, sess->psi,
120
ogs_sbi_service_type_to_name(service_type));
121
- ogs_assert(OGS_OK ==
122
- nas_5gs_send_back_gsm_message(sess,
123
+ r = nas_5gs_send_back_gsm_message(sess,
124
OGS_5GMM_CAUSE_PAYLOAD_WAS_NOT_FORWARDED,
125
- AMF_NAS_BACKOFF_TIME));
126
+ AMF_NAS_BACKOFF_TIME);
127
+ ogs_expect(r == OGS_OK);
128
+ ogs_assert(r != OGS_ERROR);
129
130
goto cleanup;
131
}
132
133
134
xact = ogs_sbi_xact_add(
135
&sess->sbi, service_type, discovery_option, NULL, NULL, NULL);
136
- ogs_expect_or_return_val(xact, false);
137
+ if (!xact) {
138
+ ogs_error("ogs_sbi_xact_add() failed");
139
+ return false;
140
+ }
141
142
xact->request = amf_nnrf_disc_build_discover(
143
sess->nssf.nrf.id, xact->service_type, xact->discovery_option);
144
- ogs_expect_or_return_val(xact->request, false);
145
+ if (!xact->request) {
146
+ ogs_error("amf_nnrf_disc_build_discover() failed");
147
+ ogs_sbi_xact_remove(xact);
148
+ return false;
149
+ }
150
151
return ogs_sbi_client_send_request(
152
client, client_discover_cb, xact->request, xact);
153
154
ogs_assert(client);
155
156
request = amf_nsmf_callback_build_n1_n2_failure_notify(sess, cause);
157
- ogs_expect_or_return_val(request, false);
158
+ if (!request) {
159
+ ogs_error("amf_nsmf_callback_build_n1_n2_failure_notify() failed");
160
+ return false;
161
+ }
162
163
rc = ogs_sbi_send_request_to_client(
164
client, client_notify_cb, request, NULL);
165
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/emm-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/emm-handler.c
Changed
116
1
2
int emm_handle_attach_request(mme_ue_t *mme_ue,
3
ogs_nas_eps_attach_request_t *attach_request, ogs_pkbuf_t *pkbuf)
4
{
5
+ int r;
6
int served_tai_index = 0;
7
8
ogs_nas_eps_mobile_identity_guti_t *eps_mobile_identity_guti = NULL;
9
10
/* Send Attach Reject */
11
ogs_warn("Cannot find Served TAIPLMN_ID:%06x,TAC:%d",
12
ogs_plmn_id_hexdump(&mme_ue->tai.plmn_id), mme_ue->tai.tac);
13
- ogs_assert(OGS_OK ==
14
- nas_eps_send_attach_reject(mme_ue,
15
+ r = nas_eps_send_attach_reject(mme_ue,
16
OGS_NAS_EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED,
17
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
18
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
19
+ ogs_expect(r == OGS_OK);
20
+ ogs_assert(r != OGS_ERROR);
21
return OGS_ERROR;
22
}
23
ogs_debug(" SERVED_TAI_INDEX%d", served_tai_index);
24
25
"but Integrity0x%x cannot be bypassed with EIA0",
26
mme_selected_enc_algorithm(mme_ue),
27
mme_selected_int_algorithm(mme_ue));
28
- ogs_assert(OGS_OK ==
29
- nas_eps_send_attach_reject(mme_ue,
30
+ r = nas_eps_send_attach_reject(mme_ue,
31
OGS_NAS_EMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH,
32
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
33
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
34
+ ogs_expect(r == OGS_OK);
35
+ ogs_assert(r != OGS_ERROR);
36
return OGS_ERROR;
37
}
38
39
40
int emm_handle_attach_complete(
41
mme_ue_t *mme_ue, ogs_nas_eps_attach_complete_t *attach_complete)
42
{
43
- int rv;
44
+ int r, rv;
45
ogs_pkbuf_t *emmbuf = NULL;
46
47
ogs_nas_eps_message_t message;
48
49
network_daylight_saving_time->length = 1;
50
51
emmbuf = nas_eps_security_encode(mme_ue, &message);
52
- ogs_expect_or_return_val(emmbuf, OGS_ERROR);
53
+ if (!emmbuf) {
54
+ ogs_error("nas_eps_security_encode() failed");
55
+ return OGS_ERROR;
56
+ }
57
58
- rv = nas_eps_send_to_downlink_nas_transport(mme_ue, emmbuf);
59
- ogs_expect_or_return_val(rv == OGS_OK, rv);
60
+ r = nas_eps_send_to_downlink_nas_transport(mme_ue, emmbuf);
61
+ ogs_expect(r == OGS_OK);
62
+ ogs_assert(r != OGS_ERROR);
63
64
ogs_debug("EMM information");
65
ogs_debug(" IMSI%s", mme_ue->imsi_bcd);
66
67
- return rv;
68
+ return r;
69
}
70
71
int emm_handle_identity_response(
72
73
int emm_handle_tau_request(mme_ue_t *mme_ue,
74
ogs_nas_eps_tracking_area_update_request_t *tau_request, ogs_pkbuf_t *pkbuf)
75
{
76
+ int r;
77
int served_tai_index = 0;
78
79
ogs_nas_eps_mobile_identity_guti_t *eps_mobile_identity_guti = NULL;
80
81
/* Send TAU reject */
82
ogs_warn("Cannot find Served TAIPLMN_ID:%06x,TAC:%d",
83
ogs_plmn_id_hexdump(&mme_ue->tai.plmn_id), mme_ue->tai.tac);
84
- ogs_assert(OGS_OK ==
85
- nas_eps_send_tau_reject(
86
- mme_ue, OGS_NAS_EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED));
87
+ r = nas_eps_send_tau_reject(
88
+ mme_ue, OGS_NAS_EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED);
89
+ ogs_expect(r == OGS_OK);
90
+ ogs_assert(r != OGS_ERROR);
91
return OGS_ERROR;
92
}
93
ogs_debug(" SERVED_TAI_INDEX%d", served_tai_index);
94
95
int emm_handle_extended_service_request(mme_ue_t *mme_ue,
96
ogs_nas_eps_extended_service_request_t *extended_service_request)
97
{
98
+ int r;
99
int served_tai_index = 0;
100
101
ogs_nas_service_type_t *service_type =
102
103
/* Send TAU reject */
104
ogs_warn("Cannot find Served TAIPLMN_ID:%06x,TAC:%d",
105
ogs_plmn_id_hexdump(&mme_ue->tai.plmn_id), mme_ue->tai.tac);
106
- ogs_assert(OGS_OK ==
107
- nas_eps_send_tau_reject(
108
- mme_ue, OGS_NAS_EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED));
109
+ r = nas_eps_send_tau_reject(
110
+ mme_ue, OGS_NAS_EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED);
111
+ ogs_expect(r == OGS_OK);
112
+ ogs_assert(r != OGS_ERROR);
113
return OGS_ERROR;
114
}
115
ogs_debug(" SERVED_TAI_INDEX%d", served_tai_index);
116
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/emm-sm.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/emm-sm.c
Changed
201
1
2
3
void emm_state_de_registered(ogs_fsm_t *s, mme_event_t *e)
4
{
5
- int rv;
6
+ int r;
7
mme_ue_t *mme_ue = NULL;
8
9
ogs_assert(e);
10
11
"Stop retransmission");
12
OGS_FSM_TRAN(&mme_ue->sm, &emm_state_exception);
13
} else {
14
- ogs_assert(mme_ue->t3470.pkbuf);
15
- rv = nas_eps_send_identity_request(mme_ue);
16
- if (rv == OGS_OK) {
17
- mme_ue->t3470.retry_count++;
18
- } else {
19
- ogs_error("nas_eps_send_identity_request() failed");
20
- OGS_FSM_TRAN(&mme_ue->sm, &emm_state_exception);
21
- }
22
+ mme_ue->t3470.retry_count++;
23
+ r = nas_eps_send_identity_request(mme_ue);
24
+ ogs_expect(r == OGS_OK);
25
+ ogs_assert(r != OGS_ERROR);
26
}
27
break;
28
29
30
31
void emm_state_registered(ogs_fsm_t *s, mme_event_t *e)
32
{
33
- int rv;
34
+ int r;
35
mme_ue_t *mme_ue = NULL;
36
37
ogs_assert(e);
38
39
* We don't have to set CNDomain.
40
* So, we just set CNDomain to 0
41
*/
42
- ogs_assert(OGS_OK == s1ap_send_paging(mme_ue, 0));
43
+ r = s1ap_send_paging(mme_ue, 0);
44
+ ogs_expect(r == OGS_OK);
45
+ ogs_assert(r != OGS_ERROR);
46
}
47
break;
48
49
50
"Stop retransmission");
51
OGS_FSM_TRAN(&mme_ue->sm, &emm_state_exception);
52
} else {
53
- ogs_assert(mme_ue->t3470.pkbuf);
54
- rv = nas_eps_send_identity_request(mme_ue);
55
- if (rv == OGS_OK) {
56
- mme_ue->t3470.retry_count++;
57
- } else {
58
- ogs_error("nas_eps_send_identity_request() failed");
59
- OGS_FSM_TRAN(&mme_ue->sm, &emm_state_exception);
60
- }
61
+ mme_ue->t3470.retry_count++;
62
+ r = nas_eps_send_identity_request(mme_ue);
63
+ ogs_expect(r == OGS_OK);
64
+ ogs_assert(r != OGS_ERROR);
65
}
66
break;
67
68
69
"Stop retransmission");
70
OGS_FSM_TRAN(&mme_ue->sm, &emm_state_exception);
71
} else {
72
- ogs_assert(mme_ue->t3422.pkbuf);
73
- rv = nas_eps_send_detach_request(mme_ue);
74
- if (rv == OGS_OK) {
75
- mme_ue->t3422.retry_count++;
76
- } else {
77
- ogs_error("nas_eps_send_detach_request() failed");
78
- OGS_FSM_TRAN(&mme_ue->sm, &emm_state_exception);
79
- }
80
+ mme_ue->t3422.retry_count++;
81
+ r = nas_eps_send_detach_request(mme_ue);
82
+ ogs_expect(r == OGS_OK);
83
+ ogs_assert(r != OGS_ERROR);
84
}
85
break;
86
87
88
89
static void common_register_state(ogs_fsm_t *s, mme_event_t *e)
90
{
91
- int rv;
92
+ int r, rv;
93
94
mme_ue_t *mme_ue = NULL;
95
enb_ue_t *enb_ue = NULL;
96
97
98
if (!MME_UE_HAVE_IMSI(mme_ue)) {
99
ogs_info("Service request : Unknown UE");
100
- ogs_assert(OGS_OK ==
101
- nas_eps_send_service_reject(mme_ue,
102
- OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
103
+ r = nas_eps_send_service_reject(mme_ue,
104
+ OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK);
105
+ ogs_expect(r == OGS_OK);
106
+ ogs_assert(r != OGS_ERROR);
107
OGS_FSM_TRAN(s, &emm_state_exception);
108
break;
109
}
110
111
if (!SECURITY_CONTEXT_IS_VALID(mme_ue)) {
112
ogs_warn("No Security Context : IMSI%s", mme_ue->imsi_bcd);
113
- ogs_assert(OGS_OK ==
114
- nas_eps_send_service_reject(mme_ue,
115
- OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
116
+ r = nas_eps_send_service_reject(mme_ue,
117
+ OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK);
118
+ ogs_expect(r == OGS_OK);
119
+ ogs_assert(r != OGS_ERROR);
120
OGS_FSM_TRAN(s, &emm_state_exception);
121
break;
122
}
123
124
if (!SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) {
125
ogs_warn("No Session Context : IMSI%s", mme_ue->imsi_bcd);
126
- ogs_assert(OGS_OK ==
127
- nas_eps_send_service_reject(mme_ue,
128
- OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
129
+ r = nas_eps_send_service_reject(mme_ue,
130
+ OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK);
131
+ ogs_expect(r == OGS_OK);
132
+ ogs_assert(r != OGS_ERROR);
133
OGS_FSM_TRAN(s, &emm_state_exception);
134
break;
135
}
136
137
if (!ACTIVE_EPS_BEARERS_IS_AVAIABLE(mme_ue)) {
138
ogs_warn("No active EPS bearers : IMSI%s", mme_ue->imsi_bcd);
139
- ogs_assert(OGS_OK ==
140
- nas_eps_send_service_reject(mme_ue,
141
- OGS_NAS_EMM_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED));
142
+ r = nas_eps_send_service_reject(mme_ue,
143
+ OGS_NAS_EMM_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED);
144
+ ogs_expect(r == OGS_OK);
145
+ ogs_assert(r != OGS_ERROR);
146
OGS_FSM_TRAN(s, &emm_state_exception);
147
break;
148
}
149
150
- ogs_assert(OGS_OK ==
151
- s1ap_send_initial_context_setup_request(mme_ue));
152
+ r = s1ap_send_initial_context_setup_request(mme_ue);
153
+ ogs_expect(r == OGS_OK);
154
+ ogs_assert(r != OGS_ERROR);
155
OGS_FSM_TRAN(s, &emm_state_registered);
156
break;
157
}
158
159
160
if (!MME_UE_HAVE_IMSI(mme_ue)) {
161
CLEAR_MME_UE_TIMER(mme_ue->t3470);
162
- ogs_assert(OGS_OK ==
163
- nas_eps_send_identity_request(mme_ue));
164
+ r = nas_eps_send_identity_request(mme_ue);
165
+ ogs_expect(r == OGS_OK);
166
+ ogs_assert(r != OGS_ERROR);
167
break;
168
}
169
170
171
&mme_ue->pdn_connectivity_request);
172
if (rv != OGS_OK) {
173
ogs_error("nas_eps_send_emm_to_esm() failed");
174
- ogs_assert(OGS_OK ==
175
- nas_eps_send_attach_reject(mme_ue,
176
+ r = nas_eps_send_attach_reject(mme_ue,
177
OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
178
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
179
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
180
+ ogs_expect(r == OGS_OK);
181
+ ogs_assert(r != OGS_ERROR);
182
OGS_FSM_TRAN(s, &emm_state_exception);
183
break;
184
}
185
186
187
if (!MME_UE_HAVE_IMSI(mme_ue)) {
188
ogs_info("TAU request : Unknown UE");
189
- ogs_assert(OGS_OK ==
190
- nas_eps_send_tau_reject(mme_ue,
191
- OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK));
192
+ r = nas_eps_send_tau_reject(mme_ue,
193
+ OGS_NAS_EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK);
194
+ ogs_expect(r == OGS_OK);
195
+ ogs_assert(r != OGS_ERROR);
196
OGS_FSM_TRAN(s, &emm_state_exception);
197
break;
198
}
199
200
if (!SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) {
201
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/esm-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/esm-handler.c
Changed
136
1
2
int esm_handle_pdn_connectivity_request(mme_bearer_t *bearer,
3
ogs_nas_eps_pdn_connectivity_request_t *req, int create_action)
4
{
5
+ int r;
6
mme_ue_t *mme_ue = NULL;
7
mme_sess_t *sess = NULL;
8
uint8_t security_protected_required = 0;
9
10
mme_ue, req->access_point_name.apn);
11
if (!sess->session) {
12
/* Invalid APN */
13
- ogs_assert(OGS_OK ==
14
- nas_eps_send_pdn_connectivity_reject(
15
- sess, OGS_NAS_ESM_CAUSE_MISSING_OR_UNKNOWN_APN, create_action));
16
+ r = nas_eps_send_pdn_connectivity_reject(
17
+ sess, OGS_NAS_ESM_CAUSE_MISSING_OR_UNKNOWN_APN,
18
+ create_action);
19
+ ogs_expect(r == OGS_OK);
20
+ ogs_assert(r != OGS_ERROR);
21
ogs_warn("Invalid APN%s", req->access_point_name.apn);
22
return OGS_ERROR;
23
}
24
25
if (derived_pdn_type == 0) {
26
ogs_error("Cannot derived PDN Type UE:%d,HSS:%d",
27
sess->request_type.type, sess->session->session_type);
28
- ogs_assert(OGS_OK ==
29
- nas_eps_send_pdn_connectivity_reject(
30
- sess, OGS_NAS_ESM_CAUSE_UNKNOWN_PDN_TYPE, create_action));
31
+ r = nas_eps_send_pdn_connectivity_reject(
32
+ sess, OGS_NAS_ESM_CAUSE_UNKNOWN_PDN_TYPE,
33
+ create_action);
34
+ ogs_expect(r == OGS_OK);
35
+ ogs_assert(r != OGS_ERROR);
36
return OGS_ERROR;
37
}
38
} else {
39
40
41
if (security_protected_required) {
42
CLEAR_BEARER_TIMER(bearer->t3489);
43
- ogs_assert(OGS_OK == nas_eps_send_esm_information_request(bearer));
44
+ r = nas_eps_send_esm_information_request(bearer);
45
+ ogs_expect(r == OGS_OK);
46
+ ogs_assert(r != OGS_ERROR);
47
48
return OGS_OK;
49
}
50
51
mme_gtp_send_create_session_request(sess, create_action));
52
} else {
53
ogs_error("No APN");
54
- ogs_assert(OGS_OK ==
55
- nas_eps_send_pdn_connectivity_reject(
56
- sess, OGS_NAS_ESM_CAUSE_MISSING_OR_UNKNOWN_APN, create_action));
57
+ r = nas_eps_send_pdn_connectivity_reject(
58
+ sess, OGS_NAS_ESM_CAUSE_MISSING_OR_UNKNOWN_APN, create_action);
59
+ ogs_expect(r == OGS_OK);
60
+ ogs_assert(r != OGS_ERROR);
61
return OGS_ERROR;
62
}
63
64
65
int esm_handle_information_response(mme_sess_t *sess,
66
ogs_nas_eps_esm_information_response_t *rsp)
67
{
68
+ int r;
69
mme_ue_t *mme_ue = NULL;
70
71
ogs_assert(sess);
72
73
if (derived_pdn_type == 0) {
74
ogs_error("Cannot derived PDN Type UE:%d,HSS:%d",
75
sess->request_type.type, sess->session->session_type);
76
- ogs_assert(OGS_OK ==
77
- nas_eps_send_pdn_connectivity_reject(
78
+ r = nas_eps_send_pdn_connectivity_reject(
79
sess, OGS_NAS_ESM_CAUSE_UNKNOWN_PDN_TYPE,
80
- OGS_GTP_CREATE_IN_ATTACH_REQUEST));
81
+ OGS_GTP_CREATE_IN_ATTACH_REQUEST);
82
+ ogs_expect(r == OGS_OK);
83
+ ogs_assert(r != OGS_ERROR);
84
return OGS_ERROR;
85
}
86
} else {
87
88
ogs_assert(OGS_OK ==
89
sgsap_send_location_update_request(mme_ue));
90
} else {
91
- ogs_assert(OGS_OK ==
92
- nas_eps_send_attach_accept(mme_ue));
93
+ r = nas_eps_send_attach_accept(mme_ue);
94
+ ogs_expect(r == OGS_OK);
95
+ ogs_assert(r != OGS_ERROR);
96
}
97
} else {
98
ogs_assert(OGS_OK ==
99
100
else
101
ogs_error("No APN");
102
103
- ogs_assert(OGS_OK ==
104
- nas_eps_send_pdn_connectivity_reject(
105
+ r = nas_eps_send_pdn_connectivity_reject(
106
sess, OGS_NAS_ESM_CAUSE_MISSING_OR_UNKNOWN_APN,
107
- OGS_GTP_CREATE_IN_ATTACH_REQUEST));
108
+ OGS_GTP_CREATE_IN_ATTACH_REQUEST);
109
+ ogs_expect(r == OGS_OK);
110
+ ogs_assert(r != OGS_ERROR);
111
return OGS_ERROR;
112
}
113
114
115
int esm_handle_bearer_resource_allocation_request(
116
mme_bearer_t *bearer, ogs_nas_eps_message_t *message)
117
{
118
+ int r;
119
mme_ue_t *mme_ue = NULL;
120
mme_sess_t *sess = NULL;
121
122
123
mme_ue = sess->mme_ue;
124
ogs_assert(mme_ue);
125
126
- ogs_assert(OGS_OK ==
127
- nas_eps_send_bearer_resource_allocation_reject(
128
- mme_ue, sess->pti, OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
129
+ r = nas_eps_send_bearer_resource_allocation_reject(
130
+ mme_ue, sess->pti, OGS_NAS_ESM_CAUSE_NETWORK_FAILURE);
131
+ ogs_expect(r == OGS_OK);
132
+ ogs_assert(r != OGS_ERROR);
133
134
return OGS_OK;
135
}
136
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/esm-sm.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/esm-sm.c
Changed
117
1
2
3
void esm_state_inactive(ogs_fsm_t *s, mme_event_t *e)
4
{
5
- int rv;
6
+ int r, rv;
7
mme_ue_t *mme_ue = NULL;
8
mme_sess_t *sess = NULL;
9
mme_bearer_t *bearer = NULL;
10
11
mme_gtp_send_delete_session_request(mme_ue->sgw_ue, sess,
12
OGS_GTP_DELETE_SEND_DEACTIVATE_BEARER_CONTEXT_REQUEST));
13
} else {
14
- ogs_assert(OGS_OK ==
15
- nas_eps_send_deactivate_bearer_context_request(bearer));
16
+ r = nas_eps_send_deactivate_bearer_context_request(bearer);
17
+ ogs_expect(r == OGS_OK);
18
+ ogs_assert(r != OGS_ERROR);
19
}
20
OGS_FSM_TRAN(s, esm_state_pdn_will_disconnect);
21
break;
22
23
h.type = e->nas_type;
24
if (h.integrity_protected == 0) {
25
ogs_error("%s No Integrity Protected", mme_ue->imsi_bcd);
26
- ogs_assert(OGS_OK ==
27
- nas_eps_send_attach_reject(mme_ue,
28
+ r = nas_eps_send_attach_reject(mme_ue,
29
OGS_NAS_EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
30
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
31
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
32
+ ogs_expect(r == OGS_OK);
33
+ ogs_assert(r != OGS_ERROR);
34
ogs_assert(mme_ue->enb_ue);
35
- ogs_assert(OGS_OK ==
36
- s1ap_send_ue_context_release_command(mme_ue->enb_ue,
37
+ r = s1ap_send_ue_context_release_command(mme_ue->enb_ue,
38
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
39
- S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0));
40
+ S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0);
41
+ ogs_expect(r == OGS_OK);
42
+ ogs_assert(r != OGS_ERROR);
43
OGS_FSM_TRAN(s, &esm_state_exception);
44
break;
45
}
46
47
if (!SECURITY_CONTEXT_IS_VALID(mme_ue)) {
48
ogs_warn("%s No Security Context", mme_ue->imsi_bcd);
49
- ogs_assert(OGS_OK ==
50
- nas_eps_send_attach_reject(mme_ue,
51
+ r = nas_eps_send_attach_reject(mme_ue,
52
OGS_NAS_EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED,
53
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
54
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
55
+ ogs_expect(r == OGS_OK);
56
+ ogs_assert(r != OGS_ERROR);
57
ogs_assert(mme_ue->enb_ue);
58
- ogs_assert(OGS_OK ==
59
- s1ap_send_ue_context_release_command(mme_ue->enb_ue,
60
+ r = s1ap_send_ue_context_release_command(mme_ue->enb_ue,
61
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
62
- S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0));
63
+ S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0);
64
+ ogs_expect(r == OGS_OK);
65
+ ogs_assert(r != OGS_ERROR);
66
OGS_FSM_TRAN(s, &esm_state_exception);
67
break;
68
}
69
70
"Stop retransmission", mme_ue->imsi_bcd);
71
OGS_FSM_TRAN(&bearer->sm, &esm_state_exception);
72
73
- ogs_assert(OGS_OK ==
74
- nas_eps_send_pdn_connectivity_reject(sess,
75
+ r = nas_eps_send_pdn_connectivity_reject(sess,
76
OGS_NAS_ESM_CAUSE_ESM_INFORMATION_NOT_RECEIVED,
77
- e->create_action));
78
+ e->create_action);
79
+ ogs_expect(r == OGS_OK);
80
+ ogs_assert(r != OGS_ERROR);
81
} else {
82
- rv = nas_eps_send_esm_information_request(bearer);
83
- if (rv == OGS_OK) {
84
- bearer->t3489.retry_count++;
85
- } else {
86
- ogs_error("nas_eps_send_esm_information_request() failed");
87
- OGS_FSM_TRAN(&bearer->sm, &esm_state_exception);
88
- }
89
+ bearer->t3489.retry_count++;
90
+ r = nas_eps_send_esm_information_request(bearer);
91
+ ogs_expect(r == OGS_OK);
92
+ ogs_assert(r != OGS_ERROR);
93
}
94
break;
95
default:
96
97
98
void esm_state_active(ogs_fsm_t *s, mme_event_t *e)
99
{
100
- int rv;
101
+ int r, rv;
102
mme_ue_t *mme_ue = NULL;
103
mme_sess_t *sess = NULL;
104
mme_bearer_t *bearer = NULL;
105
106
mme_gtp_send_delete_session_request(mme_ue->sgw_ue, sess,
107
OGS_GTP_DELETE_SEND_DEACTIVATE_BEARER_CONTEXT_REQUEST));
108
} else {
109
- ogs_assert(OGS_OK ==
110
- nas_eps_send_deactivate_bearer_context_request(bearer));
111
+ r = nas_eps_send_deactivate_bearer_context_request(bearer);
112
+ ogs_expect(r == OGS_OK);
113
+ ogs_assert(r != OGS_ERROR);
114
}
115
OGS_FSM_TRAN(s, esm_state_pdn_will_disconnect);
116
break;
117
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/mme-context.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/mme-context.c
Changed
115
1
2
mme_bearer_t *mme_bearer_find_or_add_by_message(
3
mme_ue_t *mme_ue, ogs_nas_eps_message_t *message, int create_action)
4
{
5
+ int r;
6
uint8_t pti = OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED;
7
uint8_t ebi = OGS_NAS_EPS_BEARER_IDENTITY_UNASSIGNED;
8
9
10
bearer = mme_bearer_find_by_ue_ebi(mme_ue, ebi);
11
if (!bearer) {
12
ogs_error("No Bearer : EBI%d", ebi);
13
- ogs_assert(OGS_OK ==
14
- nas_eps_send_attach_reject(mme_ue,
15
+ r = nas_eps_send_attach_reject(mme_ue,
16
OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
17
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
18
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
19
+ ogs_expect(r == OGS_OK);
20
+ ogs_assert(r != OGS_ERROR);
21
return NULL;
22
}
23
24
25
26
if (pti == OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED) {
27
ogs_error("Both PTI%d and EBI%d are 0", pti, ebi);
28
- ogs_assert(OGS_OK ==
29
- nas_eps_send_attach_reject(mme_ue,
30
+ r = nas_eps_send_attach_reject(mme_ue,
31
OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
32
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
33
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
34
+ ogs_expect(r == OGS_OK);
35
+ ogs_assert(r != OGS_ERROR);
36
return NULL;
37
}
38
39
40
if (!bearer) {
41
ogs_error("No Bearer : Linked-EBI%d",
42
linked_eps_bearer_identity->eps_bearer_identity);
43
- ogs_assert(OGS_OK ==
44
- nas_eps_send_attach_reject(mme_ue,
45
+ r = nas_eps_send_attach_reject(mme_ue,
46
OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
47
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
48
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
49
+ ogs_expect(r == OGS_OK);
50
+ ogs_assert(r != OGS_ERROR);
51
return NULL;
52
}
53
} else if (message->esm.h.message_type ==
54
55
if (!bearer) {
56
ogs_error("No Bearer : Linked-EBI%d",
57
linked_eps_bearer_identity->eps_bearer_identity);
58
- ogs_assert(OGS_OK ==
59
- nas_eps_send_bearer_resource_allocation_reject(
60
+ r = nas_eps_send_bearer_resource_allocation_reject(
61
mme_ue, pti,
62
- OGS_NAS_ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY));
63
+ OGS_NAS_ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY);
64
+ ogs_expect(r == OGS_OK);
65
+ ogs_assert(r != OGS_ERROR);
66
return NULL;
67
}
68
69
70
if (!bearer) {
71
ogs_error("No Bearer : Linked-EBI%d",
72
linked_eps_bearer_identity->eps_bearer_identity);
73
- ogs_assert(OGS_OK ==
74
- nas_eps_send_bearer_resource_modification_reject(
75
+ r = nas_eps_send_bearer_resource_modification_reject(
76
mme_ue, pti,
77
- OGS_NAS_ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY));
78
+ OGS_NAS_ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY);
79
+ ogs_expect(r == OGS_OK);
80
+ ogs_assert(r != OGS_ERROR);
81
return NULL;
82
}
83
}
84
85
sess = mme_sess_find_by_apn(mme_ue,
86
pdn_connectivity_request->access_point_name.apn);
87
if (sess && create_action != OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
88
- ogs_assert(OGS_OK ==
89
- nas_eps_send_pdn_connectivity_reject(
90
+ r = nas_eps_send_pdn_connectivity_reject(
91
sess,
92
OGS_NAS_ESM_CAUSE_MULTIPLE_PDN_CONNECTIONS_FOR_A_GIVEN_APN_NOT_ALLOWED,
93
- create_action));
94
+ create_action);
95
+ ogs_expect(r == OGS_OK);
96
+ ogs_assert(r != OGS_ERROR);
97
ogs_warn("APN duplicated %s",
98
pdn_connectivity_request->access_point_name.apn);
99
return NULL;
100
101
if (!sess) {
102
ogs_error("No Session : ESM message type%d, PTI%d",
103
message->esm.h.message_type, pti);
104
- ogs_assert(OGS_OK ==
105
- nas_eps_send_attach_reject(mme_ue,
106
+ r = nas_eps_send_attach_reject(mme_ue,
107
OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
108
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
109
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
110
+ ogs_expect(r == OGS_OK);
111
+ ogs_assert(r != OGS_ERROR);
112
return NULL;
113
}
114
}
115
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/mme-gtp-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/mme-gtp-path.c
Changed
24
1
2
3
static void timeout(ogs_gtp_xact_t *xact, void *data)
4
{
5
+ int r;
6
mme_ue_t *mme_ue = NULL;
7
enb_ue_t *enb_ue = NULL;
8
mme_sess_t *sess = NULL;
9
10
11
enb_ue = enb_ue_cycle(mme_ue->enb_ue);
12
if (enb_ue) {
13
- ogs_assert(OGS_OK ==
14
- s1ap_send_ue_context_release_command(enb_ue,
15
+ r = s1ap_send_ue_context_release_command(enb_ue,
16
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
17
- S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0));
18
+ S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0);
19
+ ogs_expect(r == OGS_OK);
20
+ ogs_assert(r != OGS_ERROR);
21
} else {
22
ogs_warn("No S1 Context");
23
}
24
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/mme-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/mme-path.c
Changed
124
1
2
3
void mme_send_delete_session_or_detach(mme_ue_t *mme_ue)
4
{
5
+ int r;
6
ogs_assert(mme_ue);
7
8
switch (mme_ue->detach_type) {
9
10
mme_gtp_send_delete_all_sessions(
11
mme_ue, OGS_GTP_DELETE_SEND_DETACH_ACCEPT);
12
} else {
13
- ogs_assert(OGS_OK == nas_eps_send_detach_accept(mme_ue));
14
+ r = nas_eps_send_detach_accept(mme_ue);
15
+ ogs_expect(r == OGS_OK);
16
+ ogs_assert(r != OGS_ERROR);
17
}
18
break;
19
20
21
22
void mme_send_delete_session_or_mme_ue_context_release(mme_ue_t *mme_ue)
23
{
24
+ int r;
25
ogs_assert(mme_ue);
26
27
if (SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) {
28
29
} else {
30
enb_ue_t *enb_ue = enb_ue_cycle(mme_ue->enb_ue);
31
if (enb_ue) {
32
- ogs_assert(OGS_OK ==
33
- s1ap_send_ue_context_release_command(enb_ue,
34
+ r = s1ap_send_ue_context_release_command(enb_ue,
35
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
36
- S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0));
37
+ S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0);
38
+ ogs_expect(r == OGS_OK);
39
+ ogs_assert(r != OGS_ERROR);
40
} else {
41
ogs_warn("%s No S1 Context", mme_ue->imsi_bcd);
42
}
43
44
45
void mme_send_release_access_bearer_or_ue_context_release(enb_ue_t *enb_ue)
46
{
47
+ int r;
48
mme_ue_t *mme_ue = NULL;
49
ogs_assert(enb_ue);
50
51
52
mme_ue, OGS_GTP_RELEASE_SEND_UE_CONTEXT_RELEASE_COMMAND));
53
} else {
54
ogs_debug("No UE Context");
55
- ogs_assert(OGS_OK ==
56
- s1ap_send_ue_context_release_command(enb_ue,
57
+ r = s1ap_send_ue_context_release_command(enb_ue,
58
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
59
- S1AP_UE_CTX_REL_S1_CONTEXT_REMOVE, 0));
60
+ S1AP_UE_CTX_REL_S1_CONTEXT_REMOVE, 0);
61
+ ogs_expect(r == OGS_OK);
62
+ ogs_assert(r != OGS_ERROR);
63
}
64
}
65
66
void mme_send_after_paging(mme_ue_t *mme_ue, bool failed)
67
{
68
+ int r;
69
mme_bearer_t *bearer = NULL;
70
71
ogs_assert(mme_ue);
72
73
mme_gtp_send_create_bearer_response(
74
bearer, OGS_GTP2_CAUSE_UNABLE_TO_PAGE_UE));
75
} else {
76
- ogs_assert(OGS_OK ==
77
- nas_eps_send_activate_dedicated_bearer_context_request(bearer));
78
+ r = nas_eps_send_activate_dedicated_bearer_context_request(bearer);
79
+ ogs_expect(r == OGS_OK);
80
+ ogs_assert(r != OGS_ERROR);
81
}
82
break;
83
case MME_PAGING_TYPE_UPDATE_BEARER:
84
85
goto cleanup;
86
}
87
88
- ogs_assert(OGS_OK ==
89
- nas_eps_send_modify_bearer_context_request(bearer,
90
+ r = nas_eps_send_modify_bearer_context_request(bearer,
91
(xact->update_flags &
92
OGS_GTP_MODIFY_QOS_UPDATE) ? 1 : 0,
93
(xact->update_flags &
94
- OGS_GTP_MODIFY_TFT_UPDATE) ? 1 : 0));
95
+ OGS_GTP_MODIFY_TFT_UPDATE) ? 1 : 0);
96
+ ogs_expect(r == OGS_OK);
97
+ ogs_assert(r != OGS_ERROR);
98
}
99
break;
100
case MME_PAGING_TYPE_DELETE_BEARER:
101
102
mme_gtp_send_delete_bearer_response(
103
bearer, OGS_GTP2_CAUSE_UNABLE_TO_PAGE_UE));
104
} else {
105
- ogs_assert(OGS_OK ==
106
- nas_eps_send_deactivate_bearer_context_request(bearer));
107
+ r = nas_eps_send_deactivate_bearer_context_request(bearer);
108
+ ogs_expect(r == OGS_OK);
109
+ ogs_assert(r != OGS_ERROR);
110
}
111
break;
112
case MME_PAGING_TYPE_CS_CALL_SERVICE:
113
114
/* Nothing */
115
ogs_warn("MME-initiated Detach cannot be invoked");
116
} else {
117
- ogs_assert(OGS_OK == nas_eps_send_detach_request(mme_ue));
118
+ r = nas_eps_send_detach_request(mme_ue);
119
+ ogs_expect(r == OGS_OK);
120
+ ogs_assert(r != OGS_ERROR);
121
if (MME_P_TMSI_IS_AVAILABLE(mme_ue)) {
122
ogs_assert(OGS_OK == sgsap_send_detach_indication(mme_ue));
123
} else {
124
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/mme-s11-handler.c
Changed
201
1
2
ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid,
3
ogs_gtp2_create_session_response_t *rsp)
4
{
5
- int rv, i;
6
+ int i, r, rv;
7
uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE;
8
uint8_t session_cause = OGS_GTP2_CAUSE_UNDEFINED_VALUE;
9
uint8_t bearer_cause = OGS_GTP2_CAUSE_UNDEFINED_VALUE;
10
11
if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
12
ogs_error("%s Attach reject Cause:%d",
13
mme_ue->imsi_bcd, session_cause);
14
- ogs_assert(OGS_OK == nas_eps_send_attach_reject(mme_ue,
15
- OGS_NAS_EMM_CAUSE_NETWORK_FAILURE, OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
16
+ r = nas_eps_send_attach_reject(mme_ue,
17
+ OGS_NAS_EMM_CAUSE_NETWORK_FAILURE,
18
+ OGS_NAS_ESM_CAUSE_NETWORK_FAILURE);
19
+ ogs_expect(r == OGS_OK);
20
+ ogs_assert(r != OGS_ERROR);
21
}
22
mme_send_delete_session_or_mme_ue_context_release(mme_ue);
23
return;
24
25
if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
26
ogs_error("%s Attach reject Cause:%d",
27
mme_ue->imsi_bcd, session_cause);
28
- ogs_assert(OGS_OK == nas_eps_send_attach_reject(mme_ue,
29
+ r = nas_eps_send_attach_reject(mme_ue,
30
OGS_NAS_EMM_CAUSE_NETWORK_FAILURE,
31
- OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
32
+ OGS_NAS_ESM_CAUSE_NETWORK_FAILURE);
33
+ ogs_expect(r == OGS_OK);
34
+ ogs_assert(r != OGS_ERROR);
35
}
36
mme_send_delete_session_or_mme_ue_context_release(mme_ue);
37
return;
38
39
mme_ue->imsi_bcd, bearer_cause);
40
if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
41
ogs_error("%s Attach reject", mme_ue->imsi_bcd);
42
- ogs_assert(OGS_OK == nas_eps_send_attach_reject(mme_ue,
43
+ r = nas_eps_send_attach_reject(mme_ue,
44
OGS_NAS_EMM_CAUSE_NETWORK_FAILURE,
45
- OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
46
+ OGS_NAS_ESM_CAUSE_NETWORK_FAILURE);
47
+ ogs_expect(r == OGS_OK);
48
+ ogs_assert(r != OGS_ERROR);
49
}
50
mme_send_delete_session_or_mme_ue_context_release(mme_ue);
51
return;
52
53
ogs_error("%s GTP Cause VALUE:%d", mme_ue->imsi_bcd, session_cause);
54
if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST) {
55
ogs_error("%s Attach reject", mme_ue->imsi_bcd);
56
- ogs_assert(OGS_OK == nas_eps_send_attach_reject(mme_ue,
57
- OGS_NAS_EMM_CAUSE_NETWORK_FAILURE, OGS_NAS_ESM_CAUSE_NETWORK_FAILURE));
58
+ r = nas_eps_send_attach_reject(mme_ue,
59
+ OGS_NAS_EMM_CAUSE_NETWORK_FAILURE,
60
+ OGS_NAS_ESM_CAUSE_NETWORK_FAILURE);
61
+ ogs_expect(r == OGS_OK);
62
+ ogs_assert(r != OGS_ERROR);
63
}
64
mme_send_delete_session_or_mme_ue_context_release(mme_ue);
65
return;
66
67
} else {
68
ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(
69
session->paa.session_type));
70
- ogs_assert(OGS_OK ==
71
- nas_eps_send_attach_accept(mme_ue));
72
+ r = nas_eps_send_attach_accept(mme_ue);
73
+ ogs_expect(r == OGS_OK);
74
+ ogs_assert(r != OGS_ERROR);
75
}
76
77
} else if (create_action == OGS_GTP_CREATE_IN_UPLINK_NAS_TRANSPORT) {
78
ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(session->paa.session_type));
79
- ogs_assert(OGS_OK ==
80
- nas_eps_send_activate_default_bearer_context_request(
81
- bearer, create_action));
82
+ r = nas_eps_send_activate_default_bearer_context_request(
83
+ bearer, create_action);
84
+ ogs_expect(r == OGS_OK);
85
+ ogs_assert(r != OGS_ERROR);
86
} else if (create_action == OGS_GTP_CREATE_IN_PATH_SWITCH_REQUEST) {
87
88
GTP_COUNTER_CHECK(mme_ue, GTP_COUNTER_CREATE_SESSION_BY_PATH_SWITCH,
89
90
mme_timer_cfg(MME_TIMER_S11_HOLDING)->duration);
91
92
sgw_ue_associate_mme_ue(target_ue, mme_ue);
93
- ogs_assert(OGS_OK == s1ap_send_path_switch_ack(mme_ue, true));
94
+ r = s1ap_send_path_switch_ack(mme_ue, true);
95
+ ogs_expect(r == OGS_OK);
96
+ ogs_assert(r != OGS_ERROR);
97
);
98
99
} else {
100
101
ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid,
102
ogs_gtp2_modify_bearer_response_t *rsp)
103
{
104
- int rv;
105
+ int r, rv;
106
uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE;
107
uint8_t session_cause = OGS_GTP2_CAUSE_UNDEFINED_VALUE;
108
int modify_action = 0;
109
110
111
switch (modify_action) {
112
case OGS_GTP_MODIFY_IN_PATH_SWITCH_REQUEST:
113
- ogs_assert(OGS_OK == s1ap_send_path_switch_ack(mme_ue, false));
114
+ r = s1ap_send_path_switch_ack(mme_ue, false);
115
+ ogs_expect(r == OGS_OK);
116
+ ogs_assert(r != OGS_ERROR);
117
break;
118
case OGS_GTP_MODIFY_IN_E_RAB_MODIFICATION:
119
- ogs_assert(OGS_OK == s1ap_send_e_rab_modification_confirm(mme_ue));
120
+ r = s1ap_send_e_rab_modification_confirm(mme_ue);
121
+ ogs_expect(r == OGS_OK);
122
+ ogs_assert(r != OGS_ERROR);
123
break;
124
default:
125
break;
126
127
ogs_gtp_xact_t *xact, mme_ue_t *mme_ue_from_teid,
128
ogs_gtp2_delete_session_response_t *rsp)
129
{
130
- int rv;
131
+ int r, rv;
132
uint8_t cause_value = OGS_GTP2_CAUSE_UNDEFINED_VALUE;
133
int action = 0;
134
sgw_ue_t *source_ue = NULL, *target_ue = NULL;
135
136
137
} else if (action == OGS_GTP_DELETE_SEND_DETACH_ACCEPT) {
138
if (mme_sess_count(mme_ue) == 1) /* Last Session */ {
139
- ogs_assert(OGS_OK == nas_eps_send_detach_accept(mme_ue));
140
+ r = nas_eps_send_detach_accept(mme_ue);
141
+ ogs_expect(r == OGS_OK);
142
+ ogs_assert(r != OGS_ERROR);
143
}
144
145
} else if (action ==
146
147
mme_bearer_t *bearer = mme_default_bearer_in_sess(sess);
148
ogs_expect_or_return(bearer);
149
150
- ogs_assert(OGS_OK ==
151
- nas_eps_send_deactivate_bearer_context_request(bearer));
152
+ r = nas_eps_send_deactivate_bearer_context_request(bearer);
153
+ ogs_expect(r == OGS_OK);
154
+ ogs_assert(r != OGS_ERROR);
155
156
/*
157
* mme_sess_remove() should not be called here.
158
159
}
160
} else {
161
ogs_assert(mme_ue->enb_ue);
162
- ogs_assert(OGS_OK ==
163
- s1ap_send_ue_context_release_command(mme_ue->enb_ue,
164
+ r = s1ap_send_ue_context_release_command(mme_ue->enb_ue,
165
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
166
- S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0));
167
+ S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0);
168
+ ogs_expect(r == OGS_OK);
169
+ ogs_assert(r != OGS_ERROR);
170
}
171
}
172
173
174
175
enb_ue = enb_ue_cycle(mme_ue->enb_ue);
176
if (enb_ue) {
177
- ogs_assert(OGS_OK ==
178
- s1ap_send_ue_context_release_command(enb_ue,
179
+ r = s1ap_send_ue_context_release_command(enb_ue,
180
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
181
- S1AP_UE_CTX_REL_S1_REMOVE_AND_UNLINK, 0));
182
+ S1AP_UE_CTX_REL_S1_REMOVE_AND_UNLINK, 0);
183
+ ogs_expect(r == OGS_OK);
184
+ ogs_assert(r != OGS_ERROR);
185
} else
186
ogs_error("ENB-S1 Context has already been removed");
187
}
188
189
&mme_ue->pdn_connectivity_request);
190
if (rv != OGS_OK) {
191
ogs_error("nas_eps_send_emm_to_esm() failed");
192
- ogs_assert(OGS_OK ==
193
- nas_eps_send_attach_reject(mme_ue,
194
+ r = nas_eps_send_attach_reject(mme_ue,
195
OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
196
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
197
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
198
+ ogs_expect(r == OGS_OK);
199
+ ogs_assert(r != OGS_ERROR);
200
}
201
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/mme-s6a-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/mme-s6a-handler.c
Changed
67
1
2
uint8_t mme_s6a_handle_aia(
3
mme_ue_t *mme_ue, ogs_diam_s6a_message_t *s6a_message)
4
{
5
+ int r;
6
ogs_diam_s6a_aia_message_t *aia_message = NULL;
7
ogs_diam_e_utran_vector_t *e_utran_vector = NULL;
8
9
10
if (mme_ue->nas_eps.ksi == OGS_NAS_KSI_NO_KEY_IS_AVAILABLE)
11
mme_ue->nas_eps.ksi = 0;
12
13
- ogs_assert(OGS_OK == nas_eps_send_authentication_request(mme_ue));
14
+ r = nas_eps_send_authentication_request(mme_ue);
15
+ ogs_expect(r == OGS_OK);
16
+ ogs_assert(r != OGS_ERROR);
17
18
return OGS_NAS_EMM_CAUSE_REQUEST_ACCEPTED;
19
}
20
21
ogs_diam_s6a_ula_message_t *ula_message = NULL;
22
ogs_subscription_data_t *subscription_data = NULL;
23
ogs_slice_data_t *slice_data = NULL;
24
- int rv, num_of_session;
25
+ int r, rv, num_of_session;
26
27
ogs_assert(mme_ue);
28
ogs_assert(s6a_message);
29
30
return OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
31
}
32
} else if (mme_ue->nas_eps.type == MME_EPS_TYPE_TAU_REQUEST) {
33
- ogs_assert(OGS_OK ==
34
- nas_eps_send_tau_accept(mme_ue,
35
- S1AP_ProcedureCode_id_InitialContextSetup));
36
+ r = nas_eps_send_tau_accept(mme_ue,
37
+ S1AP_ProcedureCode_id_InitialContextSetup);
38
+ ogs_expect(r == OGS_OK);
39
+ ogs_assert(r != OGS_ERROR);
40
} else {
41
ogs_error("Invalid Type%d", mme_ue->nas_eps.type);
42
return OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED;
43
44
45
void mme_s6a_handle_clr(mme_ue_t *mme_ue, ogs_diam_s6a_message_t *s6a_message)
46
{
47
+ int r;
48
ogs_diam_s6a_clr_message_t *clr_message = NULL;
49
ogs_assert(mme_ue);
50
ogs_assert(s6a_message);
51
52
*/
53
if (ECM_IDLE(mme_ue)) {
54
MME_STORE_PAGING_INFO(mme_ue, MME_PAGING_TYPE_DETACH_TO_UE, NULL);
55
- ogs_assert(OGS_OK == s1ap_send_paging(mme_ue, S1AP_CNDomain_ps));
56
+ r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps);
57
+ ogs_expect(r == OGS_OK);
58
+ ogs_assert(r != OGS_ERROR);
59
} else {
60
- ogs_assert(OGS_OK == nas_eps_send_detach_request(mme_ue));
61
+ r = nas_eps_send_detach_request(mme_ue);
62
+ ogs_expect(r == OGS_OK);
63
+ ogs_assert(r != OGS_ERROR);
64
if (MME_P_TMSI_IS_AVAILABLE(mme_ue)) {
65
ogs_assert(OGS_OK == sgsap_send_detach_indication(mme_ue));
66
} else {
67
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/mme-sm.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/mme-sm.c
Changed
113
1
2
3
ogs_s1ap_message_t s1ap_message;
4
ogs_pkbuf_t *pkbuf = NULL;
5
- int rc;
6
+ int rc, r;
7
8
ogs_nas_eps_message_t nas_message;
9
enb_ue_t *enb_ue = NULL;
10
11
ogs_fsm_dispatch(&enb->sm, e);
12
} else {
13
ogs_warn("Cannot decode S1AP message");
14
- ogs_assert(OGS_OK ==
15
- s1ap_send_error_indication(
16
+ r = s1ap_send_error_indication(
17
enb, NULL, NULL, S1AP_Cause_PR_protocol,
18
- S1AP_CauseProtocol_abstract_syntax_error_falsely_constructed_message));
19
+ S1AP_CauseProtocol_abstract_syntax_error_falsely_constructed_message);
20
+ ogs_expect(r == OGS_OK);
21
+ ogs_assert(r != OGS_ERROR);
22
}
23
24
ogs_s1ap_free(&s1ap_message);
25
26
pkbuf = e->pkbuf;
27
ogs_assert(pkbuf);
28
29
- ogs_expect(OGS_OK == s1ap_send_to_enb_ue(enb_ue, pkbuf));
30
+ r = s1ap_send_to_enb_ue(enb_ue, pkbuf);
31
+ ogs_expect(r == OGS_OK);
32
+ ogs_assert(r != OGS_ERROR);
33
ogs_timer_delete(e->timer);
34
break;
35
case MME_TIMER_S1_HOLDING:
36
37
if (!mme_ue) {
38
mme_ue = mme_ue_add(enb_ue);
39
if (mme_ue == NULL) {
40
- ogs_expect(OGS_OK ==
41
- s1ap_send_ue_context_release_command(enb_ue,
42
+ r = s1ap_send_ue_context_release_command(enb_ue,
43
S1AP_Cause_PR_misc,
44
S1AP_CauseMisc_control_processing_overload,
45
- S1AP_UE_CTX_REL_S1_CONTEXT_REMOVE, 0));
46
+ S1AP_UE_CTX_REL_S1_CONTEXT_REMOVE, 0);
47
+ ogs_expect(r == OGS_OK);
48
+ ogs_assert(r != OGS_ERROR);
49
ogs_pkbuf_free(pkbuf);
50
return;
51
}
52
53
/* De-associate S1 with NAS/EMM */
54
enb_ue_deassociate(mme_ue->enb_ue);
55
56
- ogs_assert(OGS_OK ==
57
- s1ap_send_ue_context_release_command(mme_ue->enb_ue,
58
+ r = s1ap_send_ue_context_release_command(mme_ue->enb_ue,
59
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
60
- S1AP_UE_CTX_REL_S1_CONTEXT_REMOVE, 0));
61
+ S1AP_UE_CTX_REL_S1_CONTEXT_REMOVE, 0);
62
+ ogs_expect(r == OGS_OK);
63
+ ogs_assert(r != OGS_ERROR);
64
}
65
enb_ue_associate_mme_ue(enb_ue, mme_ue);
66
}
67
68
ogs_error("S1 context has already been removed");
69
break;
70
}
71
- ogs_assert(OGS_OK ==
72
- nas_eps_send_attach_reject(mme_ue, emm_cause,
73
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
74
+ r = nas_eps_send_attach_reject(mme_ue, emm_cause,
75
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
76
+ ogs_expect(r == OGS_OK);
77
+ ogs_assert(r != OGS_ERROR);
78
79
- ogs_assert(OGS_OK ==
80
- s1ap_send_ue_context_release_command(enb_ue,
81
+ r = s1ap_send_ue_context_release_command(enb_ue,
82
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
83
- S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0));
84
+ S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0);
85
+ ogs_expect(r == OGS_OK);
86
+ ogs_assert(r != OGS_ERROR);
87
}
88
break;
89
case OGS_DIAM_S6A_CMD_CODE_UPDATE_LOCATION:
90
91
ogs_error("S1 context has already been removed");
92
break;
93
}
94
- ogs_assert(OGS_OK ==
95
- nas_eps_send_attach_reject(mme_ue, emm_cause,
96
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
97
+ r = nas_eps_send_attach_reject(mme_ue, emm_cause,
98
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
99
+ ogs_expect(r == OGS_OK);
100
+ ogs_assert(r != OGS_ERROR);
101
102
- ogs_assert(OGS_OK ==
103
- s1ap_send_ue_context_release_command(enb_ue,
104
+ r = s1ap_send_ue_context_release_command(enb_ue,
105
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
106
- S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0));
107
+ S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0);
108
+ ogs_expect(r == OGS_OK);
109
+ ogs_assert(r != OGS_ERROR);
110
}
111
112
mme_ue->location_updated_but_not_canceled_yet = true;
113
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/nas-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/nas-path.c
Changed
201
1
2
3
int nas_eps_send_to_enb(mme_ue_t *mme_ue, ogs_pkbuf_t *pkbuf)
4
{
5
+ int rv;
6
+
7
ogs_assert(pkbuf);
8
9
mme_ue = mme_ue_cycle(mme_ue);
10
if (!mme_ue) {
11
- ogs_warn("UE(mme-ue) context has already been removed");
12
+ ogs_error("UE(mme-ue) context has already been removed");
13
ogs_pkbuf_free(pkbuf);
14
- return OGS_ERROR;
15
+ return OGS_NOTFOUND;
16
}
17
18
- return s1ap_send_to_enb_ue(mme_ue->enb_ue, pkbuf);
19
+ rv = s1ap_send_to_enb_ue(mme_ue->enb_ue, pkbuf);
20
+ ogs_expect(rv == OGS_OK);
21
+
22
+ return rv;
23
}
24
25
int nas_eps_send_emm_to_esm(mme_ue_t *mme_ue,
26
27
28
mme_ue = mme_ue_cycle(mme_ue);
29
if (!mme_ue) {
30
- ogs_warn("UE(mme-ue) context has already been removed");
31
+ ogs_error("UE(mme-ue) context has already been removed");
32
ogs_pkbuf_free(pkbuf);
33
- return OGS_ERROR;
34
+ return OGS_NOTFOUND;
35
}
36
37
enb_ue = enb_ue_cycle(mme_ue->enb_ue);
38
if (!enb_ue) {
39
- ogs_warn("S1 context has already been removed");
40
+ ogs_error("S1 context has already been removed");
41
ogs_pkbuf_free(pkbuf);
42
- return OGS_ERROR;
43
+ return OGS_NOTFOUND;
44
}
45
46
s1apbuf = s1ap_build_downlink_nas_transport(enb_ue, pkbuf);
47
- ogs_expect_or_return_val(s1apbuf, OGS_ERROR);
48
+ if (!s1apbuf) {
49
+ ogs_error("s1ap_build_downlink_nas_transport() failed");
50
+ return OGS_ERROR;
51
+ }
52
53
rv = nas_eps_send_to_enb(mme_ue, s1apbuf);
54
ogs_expect(rv == OGS_OK);
55
56
57
esmbuf = esm_build_activate_default_bearer_context_request(
58
sess, OGS_GTP_CREATE_IN_ATTACH_REQUEST);
59
- ogs_expect_or_return_val(esmbuf, OGS_ERROR);
60
+ if (!esmbuf) {
61
+ ogs_error("esm_build_activate_default_bearer_context_request() failed");
62
+ return OGS_ERROR;
63
+ }
64
65
emmbuf = emm_build_attach_accept(mme_ue, esmbuf);
66
- ogs_expect_or_return_val(emmbuf, OGS_ERROR);
67
+ if (!emmbuf) {
68
+ ogs_error("emm_build_attach_accept() failed");
69
+ return OGS_ERROR;
70
+ }
71
72
CLEAR_MME_UE_TIMER(mme_ue->t3450);
73
mme_ue->t3450.pkbuf = ogs_pkbuf_copy(emmbuf);
74
- ogs_expect_or_return_val(mme_ue->t3450.pkbuf, OGS_ERROR);
75
+ if (!mme_ue->t3450.pkbuf) {
76
+ ogs_error("ogs_pkbuf_copy(mme_ue->t3450.pkbuf) failed");
77
+ return OGS_ERROR;
78
+ }
79
ogs_timer_start(mme_ue->t3450.timer,
80
mme_timer_cfg(MME_TIMER_T3450)->duration);
81
82
s1apbuf = s1ap_build_initial_context_setup_request(mme_ue, emmbuf);
83
- ogs_expect_or_return_val(s1apbuf, OGS_ERROR);
84
+ if (!s1apbuf) {
85
+ ogs_error("s1ap_build_initial_context_setup_request() failed");
86
+ return OGS_ERROR;
87
+ }
88
89
rv = nas_eps_send_to_enb(mme_ue, s1apbuf);
90
ogs_expect(rv == OGS_OK);
91
92
mme_sess_t *sess = NULL;
93
ogs_pkbuf_t *esmbuf = NULL, *emmbuf = NULL;
94
95
- ogs_expect_or_return_val(mme_ue, OGS_ERROR);
96
+ mme_ue = mme_ue_cycle(mme_ue);
97
+ if (!mme_ue) {
98
+ ogs_error("UE(mme-ue) context has already been removed");
99
+ return OGS_NOTFOUND;
100
+ }
101
102
ogs_debug("%s Attach reject", mme_ue->imsi_bcd);
103
ogs_debug(" Cause%d", emm_cause);
104
105
if (sess) {
106
esmbuf = esm_build_pdn_connectivity_reject(
107
sess, esm_cause, OGS_GTP_CREATE_IN_ATTACH_REQUEST);
108
- ogs_expect_or_return_val(esmbuf, OGS_ERROR);
109
+ if (!esmbuf) {
110
+ ogs_error("esm_build_pdn_connectivity_reject() failed");
111
+ return OGS_ERROR;
112
+ }
113
}
114
115
emmbuf = emm_build_attach_reject(emm_cause, esmbuf);
116
- ogs_expect_or_return_val(emmbuf, OGS_ERROR);
117
+ if (!emmbuf) {
118
+ ogs_error("emm_build_attach_reject() failed");
119
+ return OGS_ERROR;
120
+ }
121
rv = nas_eps_send_to_downlink_nas_transport(mme_ue, emmbuf);
122
- ogs_expect_or_return_val(rv == OGS_OK, rv);
123
+ ogs_expect(rv == OGS_OK);
124
125
return rv;
126
}
127
128
129
if (mme_ue->t3470.pkbuf) {
130
emmbuf = mme_ue->t3470.pkbuf;
131
- ogs_expect_or_return_val(emmbuf, OGS_ERROR);
132
} else {
133
emmbuf = emm_build_identity_request(mme_ue);
134
- ogs_expect_or_return_val(emmbuf, OGS_ERROR);
135
+ if (!emmbuf) {
136
+ ogs_error("emm_build_identity_request() failed");
137
+ return OGS_ERROR;
138
+ }
139
}
140
141
mme_ue->t3470.pkbuf = ogs_pkbuf_copy(emmbuf);
142
- ogs_expect_or_return_val(mme_ue->t3470.pkbuf, OGS_ERROR);
143
+ if (!mme_ue->t3470.pkbuf) {
144
+ ogs_error("ogs_pkbuf_copy(mme_ue->t3470.pkbuf) failed");
145
+ return OGS_ERROR;
146
+ }
147
ogs_timer_start(mme_ue->t3470.timer,
148
mme_timer_cfg(MME_TIMER_T3470)->duration);
149
150
rv = nas_eps_send_to_downlink_nas_transport(mme_ue, emmbuf);
151
- ogs_expect_or_return_val(rv == OGS_OK, rv);
152
+ ogs_expect(rv == OGS_OK);
153
154
return rv;
155
}
156
157
158
if (mme_ue->t3460.pkbuf) {
159
emmbuf = mme_ue->t3460.pkbuf;
160
- ogs_expect_or_return_val(emmbuf, OGS_ERROR);
161
} else {
162
emmbuf = emm_build_authentication_request(mme_ue);
163
- ogs_expect_or_return_val(emmbuf, OGS_ERROR);
164
+ if (!emmbuf) {
165
+ ogs_error("emm_build_authentication_request() failed");
166
+ return OGS_ERROR;
167
+ }
168
}
169
170
mme_ue->t3460.pkbuf = ogs_pkbuf_copy(emmbuf);
171
- ogs_expect_or_return_val(mme_ue->t3460.pkbuf, OGS_ERROR);
172
+ if (!mme_ue->t3460.pkbuf) {
173
+ ogs_error("ogs_pkbuf_copy(mme_ue->t3460.pkbuf) failed");
174
+ return OGS_ERROR;
175
+ }
176
ogs_timer_start(mme_ue->t3460.timer,
177
mme_timer_cfg(MME_TIMER_T3460)->duration);
178
179
rv = nas_eps_send_to_downlink_nas_transport(mme_ue, emmbuf);
180
- ogs_expect_or_return_val(rv == OGS_OK, rv);
181
+ ogs_expect(rv == OGS_OK);
182
183
return rv;
184
}
185
186
187
if (mme_ue->t3460.pkbuf) {
188
emmbuf = mme_ue->t3460.pkbuf;
189
- ogs_expect_or_return_val(emmbuf, OGS_ERROR);
190
} else {
191
emmbuf = emm_build_security_mode_command(mme_ue);
192
- ogs_expect_or_return_val(emmbuf, OGS_ERROR);
193
+ if (!emmbuf) {
194
+ ogs_error("emm_build_security_mode_command() failed");
195
+ return OGS_ERROR;
196
+ }
197
}
198
199
mme_ue->t3460.pkbuf = ogs_pkbuf_copy(emmbuf);
200
- ogs_expect_or_return_val(mme_ue->t3460.pkbuf, OGS_ERROR);
201
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/s1ap-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/s1ap-handler.c
Changed
201
1
2
void s1ap_handle_s1_setup_request(mme_enb_t *enb, ogs_s1ap_message_t *message)
3
{
4
char bufOGS_ADDRSTRLEN;
5
- int i, j;
6
+ int i, j, r;
7
8
S1AP_InitiatingMessage_t *initiatingMessage = NULL;
9
S1AP_S1SetupRequest_t *S1SetupRequest = NULL;
10
11
group = S1AP_Cause_PR_misc;
12
cause = S1AP_CauseMisc_unspecified;
13
14
- ogs_assert(OGS_OK == s1ap_send_s1_setup_failure(enb, group, cause));
15
+ r = s1ap_send_s1_setup_failure(enb, group, cause);
16
+ ogs_expect(r == OGS_OK);
17
+ ogs_assert(r != OGS_ERROR);
18
return;
19
}
20
21
22
group = S1AP_Cause_PR_misc;
23
cause = S1AP_CauseMisc_unspecified;
24
25
- ogs_assert(OGS_OK == s1ap_send_s1_setup_failure(enb, group, cause));
26
+ r = s1ap_send_s1_setup_failure(enb, group, cause);
27
+ ogs_expect(r == OGS_OK);
28
+ ogs_assert(r != OGS_ERROR);
29
return;
30
}
31
32
33
group = S1AP_Cause_PR_misc;
34
cause = S1AP_CauseMisc_unknown_PLMN;
35
36
- ogs_assert(OGS_OK == s1ap_send_s1_setup_failure(enb, group, cause));
37
+ r = s1ap_send_s1_setup_failure(enb, group, cause);
38
+ ogs_expect(r == OGS_OK);
39
+ ogs_assert(r != OGS_ERROR);
40
return;
41
}
42
43
enb->state.s1_setup_success = true;
44
- ogs_assert(OGS_OK == s1ap_send_s1_setup_response(enb));
45
+ r = s1ap_send_s1_setup_response(enb);
46
+ ogs_expect(r == OGS_OK);
47
+ ogs_assert(r != OGS_ERROR);
48
}
49
50
void s1ap_handle_initial_ue_message(mme_enb_t *enb, ogs_s1ap_message_t *message)
51
{
52
- int i;
53
+ int i, r;
54
char bufOGS_ADDRSTRLEN;
55
56
S1AP_InitiatingMessage_t *initiatingMessage = NULL;
57
58
59
if (!ENB_UE_S1AP_ID) {
60
ogs_error("No ENB_UE_S1AP_ID");
61
- ogs_assert(OGS_OK ==
62
- s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
63
- S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error));
64
+ r = s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
65
+ S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error);
66
+ ogs_expect(r == OGS_OK);
67
+ ogs_assert(r != OGS_ERROR);
68
return;
69
}
70
enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID);
71
if (!enb_ue) {
72
enb_ue = enb_ue_add(enb, *ENB_UE_S1AP_ID);
73
if (enb_ue == NULL) {
74
- ogs_assert(OGS_OK ==
75
- s1ap_send_error_indication(enb, NULL, NULL,
76
+ r = s1ap_send_error_indication(enb, NULL, NULL,
77
S1AP_Cause_PR_misc,
78
- S1AP_CauseMisc_control_processing_overload));
79
+ S1AP_CauseMisc_control_processing_overload);
80
+ ogs_expect(r == OGS_OK);
81
+ ogs_assert(r != OGS_ERROR);
82
return;
83
}
84
85
86
/* De-associate S1 with NAS/EMM */
87
enb_ue_deassociate(mme_ue->enb_ue);
88
89
- ogs_assert(OGS_OK ==
90
- s1ap_send_ue_context_release_command(mme_ue->enb_ue,
91
+ r = s1ap_send_ue_context_release_command(mme_ue->enb_ue,
92
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
93
- S1AP_UE_CTX_REL_S1_CONTEXT_REMOVE, 0));
94
+ S1AP_UE_CTX_REL_S1_CONTEXT_REMOVE, 0);
95
+ ogs_expect(r == OGS_OK);
96
+ ogs_assert(r != OGS_ERROR);
97
}
98
enb_ue_associate_mme_ue(enb_ue, mme_ue);
99
}
100
101
102
if (!NAS_PDU) {
103
ogs_error("No NAS_PDU");
104
- ogs_assert(OGS_OK ==
105
- s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
106
- S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error));
107
+ r = s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
108
+ S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error);
109
+ ogs_expect(r == OGS_OK);
110
+ ogs_assert(r != OGS_ERROR);
111
return;
112
}
113
114
if (!TAI) {
115
ogs_error("No TAI");
116
- ogs_assert(OGS_OK ==
117
- s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
118
- S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error));
119
+ r = s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
120
+ S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error);
121
+ ogs_expect(r == OGS_OK);
122
+ ogs_assert(r != OGS_ERROR);
123
return;
124
}
125
126
if (!EUTRAN_CGI) {
127
ogs_error("No EUTRAN_CGI");
128
- ogs_assert(OGS_OK ==
129
- s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
130
- S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error));
131
+ r = s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
132
+ S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error);
133
+ ogs_expect(r == OGS_OK);
134
+ ogs_assert(r != OGS_ERROR);
135
return;
136
}
137
138
139
enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id,
140
enb_ue->saved.tai.tac, enb_ue->saved.e_cgi.cell_id);
141
142
- s1ap_send_to_nas(enb_ue,
143
+ r = s1ap_send_to_nas(enb_ue,
144
S1AP_ProcedureCode_id_initialUEMessage, NAS_PDU);
145
+ ogs_expect(r == OGS_OK);
146
+ ogs_assert(r != OGS_ERROR);
147
}
148
149
void s1ap_handle_uplink_nas_transport(
150
mme_enb_t *enb, ogs_s1ap_message_t *message)
151
{
152
char bufOGS_ADDRSTRLEN;
153
- int i;
154
+ int i, r;
155
156
S1AP_InitiatingMessage_t *initiatingMessage = NULL;
157
S1AP_UplinkNASTransport_t *UplinkNASTransport = NULL;
158
159
160
if (!MME_UE_S1AP_ID) {
161
ogs_error("No MME_UE_S1AP_ID");
162
- ogs_assert(OGS_OK ==
163
- s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
164
- S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error));
165
+ r = s1ap_send_error_indication(enb, NULL, ENB_UE_S1AP_ID,
166
+ S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error);
167
+ ogs_expect(r == OGS_OK);
168
+ ogs_assert(r != OGS_ERROR);
169
return;
170
}
171
172
173
if (!enb_ue) {
174
ogs_error("No eNB UE Context : MME_UE_S1AP_ID%lld",
175
(long long)*MME_UE_S1AP_ID);
176
- ogs_assert(OGS_OK ==
177
- s1ap_send_error_indication(enb, MME_UE_S1AP_ID, NULL,
178
+ r = s1ap_send_error_indication(enb, MME_UE_S1AP_ID, NULL,
179
S1AP_Cause_PR_radioNetwork,
180
- S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id));
181
+ S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id);
182
+ ogs_expect(r == OGS_OK);
183
+ ogs_assert(r != OGS_ERROR);
184
return;
185
}
186
187
if (!ENB_UE_S1AP_ID) {
188
ogs_error("No ENB_UE_S1AP_ID");
189
- ogs_assert(OGS_OK ==
190
- s1ap_send_error_indication(enb, MME_UE_S1AP_ID, ENB_UE_S1AP_ID,
191
- S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error));
192
+ r = s1ap_send_error_indication(enb, MME_UE_S1AP_ID, ENB_UE_S1AP_ID,
193
+ S1AP_Cause_PR_protocol, S1AP_CauseProtocol_semantic_error);
194
+ ogs_expect(r == OGS_OK);
195
+ ogs_assert(r != OGS_ERROR);
196
return;
197
}
198
199
200
201
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/s1ap-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/s1ap-path.c
Changed
201
1
2
3
enb = mme_enb_cycle(enb);
4
if (!enb) {
5
- ogs_warn("eNB has already been removed");
6
+ ogs_error("eNB has already been removed");
7
ogs_pkbuf_free(pkbuf);
8
- return OGS_ERROR;
9
+ return OGS_NOTFOUND;
10
}
11
12
ogs_assert(enb->sctp.sock);
13
if (enb->sctp.sock->fd == INVALID_SOCKET) {
14
ogs_fatal("eNB SCTP socket has already been destroyed");
15
ogs_log_hexdump(OGS_LOG_FATAL, pkbuf->data, pkbuf->len);
16
- ogs_assert_if_reached();
17
+ ogs_pkbuf_free(pkbuf);
18
return OGS_ERROR;
19
}
20
21
22
23
int s1ap_send_to_enb_ue(enb_ue_t *enb_ue, ogs_pkbuf_t *pkbuf)
24
{
25
+ int rv;
26
ogs_assert(pkbuf);
27
28
enb_ue = enb_ue_cycle(enb_ue);
29
if (!enb_ue) {
30
- ogs_warn("S1 context has already been removed");
31
+ ogs_error("S1 context has already been removed");
32
ogs_pkbuf_free(pkbuf);
33
- return OGS_ERROR;
34
+ return OGS_NOTFOUND;
35
}
36
37
- return s1ap_send_to_enb(enb_ue->enb, pkbuf, enb_ue->enb_ostream_id);
38
+ rv = s1ap_send_to_enb(enb_ue->enb, pkbuf, enb_ue->enb_ostream_id);
39
+ ogs_expect(rv == OGS_OK);
40
+
41
+ return rv;
42
}
43
44
int s1ap_delayed_send_to_enb_ue(
45
46
47
return OGS_OK;
48
} else {
49
- mme_enb_t *enb = NULL;
50
- enb = enb_ue->enb;
51
- ogs_assert(enb);
52
- return s1ap_send_to_enb_ue(enb_ue, pkbuf);
53
+ int rv = s1ap_send_to_enb_ue(enb_ue, pkbuf);
54
+ ogs_expect(rv == OGS_OK);
55
+
56
+ return rv;
57
}
58
}
59
60
61
int s1ap_send_to_nas(enb_ue_t *enb_ue,
62
S1AP_ProcedureCode_t procedureCode, S1AP_NAS_PDU_t *nasPdu)
63
{
64
+ int rv;
65
ogs_nas_eps_security_header_t *sh = NULL;
66
ogs_nas_security_header_type_t security_header_type;
67
68
69
ogs_pkbuf_free(nasbuf);
70
return OGS_ERROR;
71
}
72
- return s1ap_send_to_esm(
73
+ rv = s1ap_send_to_esm(
74
mme_ue, nasbuf, security_header_type.type,
75
OGS_GTP_CREATE_IN_UPLINK_NAS_TRANSPORT);
76
+ ogs_expect(rv == OGS_OK);
77
+ return rv;
78
} else {
79
ogs_error("Unknown/Unimplemented NAS Protocol discriminator 0x%02x",
80
h->protocol_discriminator);
81
82
83
ogs_debug("S1-Setup response");
84
s1ap_buffer = s1ap_build_setup_rsp();
85
- ogs_expect_or_return_val(s1ap_buffer, OGS_ERROR);
86
+ if (!s1ap_buffer) {
87
+ ogs_error("s1ap_build_setup_rsp() failed");
88
+ return OGS_ERROR;
89
+ }
90
91
rv = s1ap_send_to_enb(enb, s1ap_buffer, S1AP_NON_UE_SIGNALLING);
92
ogs_expect(rv == OGS_OK);
93
94
95
ogs_debug("S1-Setup failure");
96
s1ap_buffer = s1ap_build_setup_failure(group, cause, S1AP_TimeToWait_v10s);
97
- ogs_expect_or_return_val(s1ap_buffer, OGS_ERROR);
98
+ if (!s1ap_buffer) {
99
+ ogs_error("s1ap_build_setup_failure() failed");
100
+ return OGS_ERROR;
101
+ }
102
103
rv = s1ap_send_to_enb(enb, s1ap_buffer, S1AP_NON_UE_SIGNALLING);
104
ogs_expect(rv == OGS_OK);
105
106
107
ogs_debug("InitialContextSetupRequest");
108
s1apbuf = s1ap_build_initial_context_setup_request(mme_ue, NULL);
109
- ogs_expect_or_return_val(s1apbuf, OGS_ERROR);
110
+ if (!s1apbuf) {
111
+ ogs_error("s1ap_build_initial_context_setup_request() failed");
112
+ return OGS_ERROR;
113
+ }
114
115
rv = nas_eps_send_to_enb(mme_ue, s1apbuf);
116
ogs_expect(rv == OGS_OK);
117
118
119
ogs_debug("UEContextModificationRequest");
120
s1apbuf = s1ap_build_ue_context_modification_request(mme_ue);
121
- ogs_expect_or_return_val(s1apbuf, OGS_ERROR);
122
+ if (!s1apbuf) {
123
+ ogs_error("s1ap_build_ue_context_modification_request() failed");
124
+ return OGS_ERROR;
125
+ }
126
127
rv = nas_eps_send_to_enb(mme_ue, s1apbuf);
128
ogs_expect(rv == OGS_OK);
129
130
group, (int)cause, action, (int)duration);
131
132
s1apbuf = s1ap_build_ue_context_release_command(enb_ue, group, cause);
133
- ogs_expect_or_return_val(s1apbuf, OGS_ERROR);
134
+ if (!s1apbuf) {
135
+ ogs_error("s1ap_build_ue_context_release_command() failed");
136
+ return OGS_ERROR;
137
+ }
138
139
rv = s1ap_delayed_send_to_enb_ue(enb_ue, s1apbuf, duration);
140
ogs_expect(rv == OGS_OK);
141
142
s1apbuf = mme_ue->t3413.pkbuf;
143
} else {
144
s1apbuf = s1ap_build_paging(mme_ue, cn_domain);
145
- ogs_expect_or_return_val(s1apbuf, OGS_ERROR);
146
+ if (!s1apbuf) {
147
+ ogs_error("s1ap_build_paging() failed");
148
+ return OGS_ERROR;
149
+ }
150
}
151
152
mme_ue->t3413.pkbuf = ogs_pkbuf_copy(s1apbuf);
153
- ogs_expect_or_return_val(mme_ue->t3413.pkbuf, OGS_ERROR);
154
+ if (!mme_ue->t3413.pkbuf) {
155
+ ogs_error("ogs_pkbuf_copy() failed");
156
+ return OGS_ERROR;
157
+ }
158
159
rv = s1ap_send_to_enb(enb, s1apbuf, S1AP_NON_UE_SIGNALLING);
160
- ogs_expect_or_return_val(rv == OGS_OK, rv);
161
+ if (rv != OGS_OK) {
162
+ ogs_error("s1ap_send_to_enb() failed");
163
+ return rv;
164
+ }
165
}
166
}
167
}
168
169
170
ogs_debug("MMEConfigurationTransfer");
171
s1apbuf = s1ap_build_mme_configuration_transfer(SONConfigurationTransfer);
172
- ogs_expect_or_return_val(s1apbuf, OGS_ERROR);
173
+ if (!s1apbuf) {
174
+ ogs_error("s1ap_build_mme_configuration_transfer() failed");
175
+ return OGS_ERROR;
176
+ }
177
178
rv = s1ap_send_to_enb(target_enb, s1apbuf, S1AP_NON_UE_SIGNALLING);
179
ogs_expect(rv == OGS_OK);
180
181
182
ogs_debug("E-RABModificationConfirm");
183
s1apbuf = s1ap_build_e_rab_modification_confirm(mme_ue);
184
- ogs_expect_or_return_val(s1apbuf, OGS_ERROR);
185
+ if (!s1apbuf) {
186
+ ogs_error("s1ap_build_e_rab_modification_confirm() failed");
187
+ return OGS_ERROR;
188
+ }
189
190
rv = nas_eps_send_to_enb(mme_ue, s1apbuf);
191
ogs_expect(rv == OGS_OK);
192
193
ogs_debug("PathSwitchAcknowledge");
194
s1apbuf = s1ap_build_path_switch_ack(
195
mme_ue, e_rab_to_switched_in_uplink_list);
196
- ogs_expect_or_return_val(s1apbuf, OGS_ERROR);
197
+ if (!s1apbuf) {
198
+ ogs_error("s1ap_build_path_switch_ack() failed");
199
+ return OGS_ERROR;
200
+ }
201
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/sbc-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/sbc-handler.c
Changed
57
1
2
{
3
ogs_pkbuf_t *s1apbuf = NULL;
4
mme_enb_t *enb = NULL;
5
- int i, j, flag;
6
+ int i, j, flag, r;
7
8
/* Find enB with matched TAI */
9
ogs_list_for_each(&mme_self()->enb_list, enb) {
10
11
if (flag) {
12
/* Build S1AP Write Replace Warning Request message */
13
s1apbuf = s1ap_build_write_replace_warning_request(sbc_pws);
14
- ogs_expect_or_return(s1apbuf);
15
+ if (!s1apbuf) {
16
+ ogs_error("s1ap_build_kill_request() failed");
17
+ return;
18
+ }
19
20
/* Send to enb */
21
- ogs_expect(s1ap_send_to_enb(
22
- enb, s1apbuf, S1AP_NON_UE_SIGNALLING) == OGS_OK);
23
+ r = s1ap_send_to_enb(enb, s1apbuf, S1AP_NON_UE_SIGNALLING);
24
+ ogs_expect(r == OGS_OK);
25
+ ogs_assert(r != OGS_ERROR);
26
}
27
}
28
}
29
30
{
31
ogs_pkbuf_t *s1apbuf = NULL;
32
mme_enb_t *enb = NULL;
33
- int i, j, flag;
34
+ int i, j, flag, r;
35
36
/* Find enB with matched TAI */
37
ogs_list_for_each(&mme_self()->enb_list, enb) {
38
39
if (flag) {
40
/* Build S1AP Kill request message */
41
s1apbuf = s1ap_build_kill_request(sbc_pws);
42
- ogs_expect_or_return(s1apbuf);
43
+ if (!s1apbuf) {
44
+ ogs_error("s1ap_build_kill_request() failed");
45
+ return;
46
+ }
47
48
/* Send to enb */
49
- ogs_expect(s1ap_send_to_enb(
50
- enb, s1apbuf, S1AP_NON_UE_SIGNALLING) == OGS_OK);
51
+ r = s1ap_send_to_enb(enb, s1apbuf, S1AP_NON_UE_SIGNALLING);
52
+ ogs_expect(r == OGS_OK);
53
+ ogs_assert(r != OGS_ERROR);
54
}
55
}
56
}
57
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/sgsap-handler.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/sgsap-handler.c
Changed
115
1
2
3
void sgsap_handle_location_update_accept(mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf)
4
{
5
+ int r;
6
ogs_tlv_t *root = NULL, *iter = NULL;
7
mme_ue_t *mme_ue = NULL;
8
9
10
ogs_debug(" P-TMSI0x%08x", mme_ue->p_tmsi);
11
}
12
13
- ogs_assert(OGS_OK ==
14
- nas_eps_send_attach_accept(mme_ue));
15
+ r = nas_eps_send_attach_accept(mme_ue);
16
+ ogs_expect(r == OGS_OK);
17
+ ogs_assert(r != OGS_ERROR);
18
19
return;
20
21
error:
22
- ogs_assert(OGS_OK ==
23
- nas_eps_send_attach_reject(mme_ue,
24
+ r = nas_eps_send_attach_reject(mme_ue,
25
OGS_NAS_EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,
26
- OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
27
+ OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
28
+ ogs_expect(r == OGS_OK);
29
+ ogs_assert(r != OGS_ERROR);
30
mme_send_delete_session_or_mme_ue_context_release(mme_ue);
31
}
32
33
void sgsap_handle_location_update_reject(mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf)
34
{
35
+ int r;
36
ogs_tlv_t *root = NULL, *iter = NULL;
37
mme_ue_t *mme_ue = NULL;
38
39
40
ogs_plmn_id_hexdump(&lai->nas_plmn_id), lai->lac);
41
}
42
43
- ogs_assert(OGS_OK ==
44
- nas_eps_send_attach_reject(mme_ue,
45
- emm_cause, OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED));
46
+ r = nas_eps_send_attach_reject(mme_ue,
47
+ emm_cause, OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
48
+ ogs_expect(r == OGS_OK);
49
+ ogs_assert(r != OGS_ERROR);
50
mme_send_delete_session_or_mme_ue_context_release(mme_ue);
51
52
return;
53
54
55
void sgsap_handle_paging_request(mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf)
56
{
57
+ int r;
58
ogs_tlv_t *root = NULL, *iter = NULL;
59
mme_ue_t *mme_ue = NULL;
60
61
62
/* UE will respond Extended Service Request in PS CNDomain*/
63
MME_STORE_PAGING_INFO(mme_ue,
64
MME_PAGING_TYPE_CS_CALL_SERVICE, NULL);
65
- ogs_assert(OGS_OK ==
66
- s1ap_send_paging(mme_ue, S1AP_CNDomain_cs));
67
+ r = s1ap_send_paging(mme_ue, S1AP_CNDomain_cs);
68
+ ogs_expect(r == OGS_OK);
69
+ ogs_assert(r != OGS_ERROR);
70
71
} else if (SMS_SERVICE_INDICATOR(mme_ue)) {
72
/* UE will respond Service Request in PS CNDomain*/
73
MME_STORE_PAGING_INFO(mme_ue,
74
MME_PAGING_TYPE_SMS_SERVICE, NULL);
75
- ogs_assert(OGS_OK ==
76
- s1ap_send_paging(mme_ue, S1AP_CNDomain_ps));
77
+ r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps);
78
+ ogs_expect(r == OGS_OK);
79
+ ogs_assert(r != OGS_ERROR);
80
} else
81
goto paging_reject;
82
83
} else {
84
if (CS_CALL_SERVICE_INDICATOR(mme_ue)) {
85
- ogs_assert(OGS_OK ==
86
- nas_eps_send_cs_service_notification(mme_ue));
87
+ r = nas_eps_send_cs_service_notification(mme_ue);
88
+ ogs_expect(r == OGS_OK);
89
+ ogs_assert(r != OGS_ERROR);
90
} else if (SMS_SERVICE_INDICATOR(mme_ue)) {
91
ogs_assert(OGS_OK ==
92
sgsap_send_service_request(
93
94
95
void sgsap_handle_downlink_unitdata(mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf)
96
{
97
+ int r;
98
ogs_tlv_t *root = NULL, *iter = NULL;
99
mme_ue_t *mme_ue = NULL;
100
101
102
nas_message_container_buffer,
103
nas_message_container_length);
104
105
- ogs_assert(OGS_OK ==
106
- nas_eps_send_downlink_nas_transport(mme_ue,
107
- nas_message_container_buffer, nas_message_container_length));
108
+ r = nas_eps_send_downlink_nas_transport(mme_ue,
109
+ nas_message_container_buffer, nas_message_container_length);
110
+ ogs_expect(r == OGS_OK);
111
+ ogs_assert(r != OGS_ERROR);
112
}
113
114
void sgsap_handle_reset_indication(mme_vlr_t *vlr, ogs_pkbuf_t *pkbuf)
115
open5gs_2.5.5.100.a8f8.tar.xz/src/mme/sgsap-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/mme/sgsap-path.c
Changed
109
1
2
ogs_debug(" IMSI%s", mme_ue->imsi_bcd);
3
4
pkbuf = sgsap_build_location_update_request(mme_ue);
5
- ogs_expect_or_return_val(pkbuf, OGS_ERROR);
6
+ if (!pkbuf) {
7
+ ogs_error("sgsap_build_location_update_request() failed");
8
+ return OGS_ERROR;
9
+ }
10
rv = sgsap_send_to_vlr(mme_ue, pkbuf);
11
ogs_expect(rv == OGS_OK);
12
13
14
ogs_debug(" IMSI%s", mme_ue->imsi_bcd);
15
16
pkbuf = sgsap_build_tmsi_reallocation_complete(mme_ue);
17
- ogs_expect_or_return_val(pkbuf, OGS_ERROR);
18
+ if (!pkbuf) {
19
+ ogs_error("sgsap_build_tmsi_reallocation_complete() failed");
20
+ return OGS_ERROR;
21
+ }
22
rv = sgsap_send_to_vlr(mme_ue, pkbuf);
23
ogs_expect(rv == OGS_OK);
24
25
26
ogs_assert(mme_ue);
27
28
pkbuf = sgsap_build_detach_indication(mme_ue);
29
- ogs_expect_or_return_val(pkbuf, OGS_ERROR);
30
+ if (!pkbuf) {
31
+ ogs_error("sgsap_build_detach_indication() failed");
32
+ return OGS_ERROR;
33
+ }
34
rv = sgsap_send_to_vlr(mme_ue, pkbuf);
35
ogs_expect(rv == OGS_OK);
36
37
38
ogs_debug(" IMSI%s", mme_ue->imsi_bcd);
39
40
pkbuf = sgsap_build_mo_csfb_indication(mme_ue);
41
- ogs_expect_or_return_val(pkbuf, OGS_ERROR);
42
+ if (!pkbuf) {
43
+ ogs_error("sgsap_build_mo_csfb_indication() failed");
44
+ return OGS_ERROR;
45
+ }
46
rv = sgsap_send_to_vlr(mme_ue, pkbuf);
47
ogs_expect(rv == OGS_OK);
48
49
50
pkbuf = sgsap_build_paging_reject(
51
&mme_ue->nas_mobile_identity_imsi,
52
SGSAP_IE_IMSI_LEN, sgs_cause);
53
- ogs_expect_or_return_val(pkbuf, OGS_ERROR);
54
+ if (!pkbuf) {
55
+ ogs_error("sgsap_build_paging_reject() failed");
56
+ return OGS_ERROR;
57
+ }
58
rv = sgsap_send_to_vlr(mme_ue, pkbuf);
59
ogs_expect(rv == OGS_OK);
60
61
62
ogs_debug(" EMM_MODE%d", emm_mode);
63
64
pkbuf = sgsap_build_service_request(mme_ue, emm_mode);
65
- ogs_expect_or_return_val(pkbuf, OGS_ERROR);
66
+ if (!pkbuf) {
67
+ ogs_error("sgsap_build_service_request() failed");
68
+ return OGS_ERROR;
69
+ }
70
rv = sgsap_send_to_vlr(mme_ue, pkbuf);
71
ogs_expect(rv == OGS_OK);
72
73
74
ogs_debug("SGSAP RESET-ACK");
75
76
pkbuf = sgsap_build_reset_ack(vlr);
77
- ogs_expect_or_return_val(pkbuf, OGS_ERROR);
78
+ if (!pkbuf) {
79
+ ogs_error("sgsap_build_reset_ack() failed");
80
+ return OGS_ERROR;
81
+ }
82
rv = sgsap_send_to_vlr_with_sid(vlr, pkbuf, 0);
83
ogs_expect(rv == OGS_OK);
84
85
86
nas_message_container->buffer, nas_message_container->length);
87
88
pkbuf = sgsap_build_uplink_unidata(mme_ue, nas_message_container);
89
- ogs_expect_or_return_val(pkbuf, OGS_ERROR);
90
+ if (!pkbuf) {
91
+ ogs_error("sgsap_build_uplink_unidata() failed");
92
+ return OGS_ERROR;
93
+ }
94
rv = sgsap_send_to_vlr(mme_ue, pkbuf);
95
ogs_expect(rv == OGS_OK);
96
97
98
ogs_debug(" CAUSE%d", sgs_cause);
99
100
pkbuf = sgsap_build_ue_unreachable(mme_ue, sgs_cause);
101
- ogs_expect_or_return_val(pkbuf, OGS_ERROR);
102
+ if (!pkbuf) {
103
+ ogs_error("sgsap_build_ue_unreachable() failed");
104
+ return OGS_ERROR;
105
+ }
106
rv = sgsap_send_to_vlr(mme_ue, pkbuf);
107
ogs_expect(rv == OGS_OK);
108
109
open5gs_2.5.5.100.a8f8.tar.xz/src/nrf/sbi-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/nrf/sbi-path.c
Changed
46
1
2
3
ogs_assert(subscription_data);
4
client = subscription_data->client;
5
- ogs_expect_or_return_val(client, false);
6
+ if (!client) {
7
+ ogs_error("No Client");
8
+ return false;
9
+ }
10
11
request = nrf_nnrf_nfm_build_nf_status_notify(
12
subscription_data, event, nf_instance);
13
- ogs_expect_or_return_val(request, false);
14
+ if (!request) {
15
+ ogs_error("nrf_nnrf_nfm_build_nf_status_notify() failed");
16
+ return false;
17
+ }
18
19
rc = ogs_sbi_send_request_to_client(
20
client, client_notify_cb, request, NULL);
21
22
OpenAPI_notification_event_type_e event,
23
ogs_sbi_nf_instance_t *nf_instance)
24
{
25
+ bool rc;
26
ogs_sbi_subscription_data_t *subscription_data = NULL;
27
28
ogs_assert(nf_instance);
29
30
continue;
31
}
32
33
- ogs_expect_or_return_val(true ==
34
- nrf_nnrf_nfm_send_nf_status_notify(
35
- subscription_data, event, nf_instance),
36
- false);
37
+ rc = nrf_nnrf_nfm_send_nf_status_notify(
38
+ subscription_data, event, nf_instance);
39
+ if (rc == false) {
40
+ ogs_error("nrf_nnrf_nfm_send_nf_status_notify() failed");
41
+ return rc;
42
+ }
43
}
44
45
return true;
46
open5gs_2.5.5.100.a8f8.tar.xz/src/pcf/sbi-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/pcf/sbi-path.c
Changed
86
1
2
xact = ogs_sbi_xact_add(
3
sbi_object, service_type, discovery_option,
4
build, context, data);
5
- ogs_expect_or_return_val(xact, false);
6
+ if (!xact) {
7
+ ogs_error("ogs_sbi_xact_add() failed");
8
+ return false;
9
+ }
10
11
xact->assoc_stream = stream;
12
13
14
ogs_assert(service_type);
15
16
xact = ogs_sbi_xact_add(&sess->sbi, service_type, NULL, NULL, NULL, NULL);
17
- ogs_expect_or_return_val(xact, false);
18
+ if (!xact) {
19
+ ogs_error("ogs_sbi_xact_add() failed");
20
+ return false;
21
+ }
22
23
xact->assoc_stream = stream;
24
25
26
ogs_assert(client);
27
28
request = pcf_namf_callback_build_am_policy_control(pcf_ue, NULL);
29
- ogs_expect_or_return_val(request, false);
30
+ if (!request) {
31
+ ogs_error("pcf_namf_callback_build_am_policy_control() failed");
32
+ return false;
33
+ }
34
35
rc = ogs_sbi_send_request_to_client(
36
client, client_notify_cb, request, NULL);
37
38
39
request = pcf_nsmf_callback_build_smpolicycontrol_update(
40
sess, SmPolicyDecision);
41
- ogs_expect_or_return_val(request, false);
42
+ if (!request) {
43
+ ogs_error("pcf_nsmf_callback_build_smpolicycontrol_update() failed");
44
+ return false;
45
+ }
46
47
rc = ogs_sbi_send_request_to_client(
48
client, client_notify_cb, request, NULL);
49
50
51
request = pcf_nsmf_callback_build_smpolicycontrol_update(
52
sess, SmPolicyDecision);
53
- ogs_expect_or_return_val(request, false);
54
+ if (!request) {
55
+ ogs_error("pcf_nsmf_callback_build_smpolicycontrol_update() failed");
56
+ return false;
57
+ }
58
59
rc = ogs_sbi_send_request_to_client(
60
client, client_delete_notify_cb, request, app_session);
61
62
ogs_assert(client);
63
64
request = pcf_nsmf_callback_build_smpolicycontrol_terminate(sess, NULL);
65
- ogs_expect_or_return_val(request, false);
66
+ if (!request) {
67
+ ogs_error("pcf_nsmf_callback_build_smpolicycontrol_terminate() failed");
68
+ return false;
69
+ }
70
71
rc = ogs_sbi_send_request_to_client(
72
client, client_notify_cb, request, NULL);
73
74
ogs_assert(client);
75
76
request = pcf_naf_callback_build_policyauthorization_terminate(app, NULL);
77
- ogs_expect_or_return_val(request, false);
78
+ if (!request) {
79
+ ogs_error("pcf_naf_callback_build_policyauthorization_terminate() "
80
+ "failed");
81
+ return false;
82
+ }
83
84
rc = ogs_sbi_send_request_to_client(
85
client, client_notify_cb, request, NULL);
86
open5gs_2.5.5.100.a8f8.tar.xz/src/smf/sbi-path.c -> open5gs_2.5.5.101.6895.tar.xz/src/smf/sbi-path.c
Changed
13
1
2
ogs_assert(client);
3
4
request = smf_namf_callback_build_sm_context_status(sess, NULL);
5
- ogs_expect_or_return_val(request, false);
6
+ if (!request) {
7
+ ogs_error("smf_namf_callback_build_sm_context_status() failed");
8
+ return false;
9
+ }
10
11
rc = ogs_sbi_send_request_to_client(
12
client, client_notify_cb, request, NULL);
13