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 99
commit_9f4a9790e3cb1f7f05c8f97cf6a99c15752e05d5.txt
Added
commit_bfd5cefe535edd0f16908d3b86454980a7ba072a.txt
Deleted
open5gs_2.5.5.76.bfd5c.dsc
Deleted
x
1
2
-Format: 3.0 (native)
3
-Source: open5gs
4
-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
5
-Architecture: any
6
-Version: 2.5.5.76.bfd5c
7
-Maintainer: Harald Welte <laforge@gnumonks.org>
8
-Uploaders: Sukchan Lee <acetcom@gmail.com>
9
-Homepage: https://open5gs.org
10
-Standards-Version: 4.3.0
11
-Vcs-Browser: https://github.com/open5gs/open5gs
12
-Vcs-Git: git://github.com/open5gs/open5gs
13
-Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev
14
-Package-List:
15
- open5gs deb net optional arch=any
16
- open5gs-amf deb net optional arch=any
17
- open5gs-ausf deb net optional arch=any
18
- open5gs-bsf deb net optional arch=any
19
- open5gs-common deb net optional arch=any
20
- open5gs-dbg deb net optional arch=any
21
- open5gs-hss deb net optional arch=any
22
- open5gs-mme deb net optional arch=any
23
- open5gs-nrf deb net optional arch=any
24
- open5gs-nssf deb net optional arch=any
25
- open5gs-pcf deb net optional arch=any
26
- open5gs-pcrf deb net optional arch=any
27
- open5gs-scp deb net optional arch=any
28
- open5gs-sgwc deb net optional arch=any
29
- open5gs-sgwu deb net optional arch=any
30
- open5gs-smf deb net optional arch=any
31
- open5gs-udm deb net optional arch=any
32
- open5gs-udr deb net optional arch=any
33
- open5gs-upf deb net optional arch=any
34
-Checksums-Sha1:
35
- 559badb847ec2db77cb788268bfa8b9f716952d3 13606064 open5gs_2.5.5.76.bfd5c.tar.xz
36
-Checksums-Sha256:
37
- 5ecaf931dcce9b03aa62b5475eb84e8e58970d998afc948e3f6865c04359569c 13606064 open5gs_2.5.5.76.bfd5c.tar.xz
38
-Files:
39
- 06fed27dee0d5aad5bfd5bbe52e86100 13606064 open5gs_2.5.5.76.bfd5c.tar.xz
40
open5gs_2.5.5.77.9f4a9.dsc
Added
40
1
2
+Format: 3.0 (native)
3
+Source: open5gs
4
+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
5
+Architecture: any
6
+Version: 2.5.5.77.9f4a9
7
+Maintainer: Harald Welte <laforge@gnumonks.org>
8
+Uploaders: Sukchan Lee <acetcom@gmail.com>
9
+Homepage: https://open5gs.org
10
+Standards-Version: 4.3.0
11
+Vcs-Browser: https://github.com/open5gs/open5gs
12
+Vcs-Git: git://github.com/open5gs/open5gs
13
+Build-Depends: debhelper (>= 11), git, pkg-config, meson (>= 0.43.0), cmake, flex, bison, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libsctp-dev, libyaml-dev, libmicrohttpd-dev, libcurl4-gnutls-dev, libnghttp2-dev, libtins-dev, libtalloc-dev
14
+Package-List:
15
+ open5gs deb net optional arch=any
16
+ open5gs-amf deb net optional arch=any
17
+ open5gs-ausf deb net optional arch=any
18
+ open5gs-bsf deb net optional arch=any
19
+ open5gs-common deb net optional arch=any
20
+ open5gs-dbg deb net optional arch=any
21
+ open5gs-hss deb net optional arch=any
22
+ open5gs-mme deb net optional arch=any
23
+ open5gs-nrf deb net optional arch=any
24
+ open5gs-nssf deb net optional arch=any
25
+ open5gs-pcf deb net optional arch=any
26
+ open5gs-pcrf deb net optional arch=any
27
+ open5gs-scp deb net optional arch=any
28
+ open5gs-sgwc deb net optional arch=any
29
+ open5gs-sgwu deb net optional arch=any
30
+ open5gs-smf deb net optional arch=any
31
+ open5gs-udm deb net optional arch=any
32
+ open5gs-udr deb net optional arch=any
33
+ open5gs-upf deb net optional arch=any
34
+Checksums-Sha1:
35
+ 9b351fc88e82beacb3dad1b6e0c5f8ca0cb4d5ed 13606744 open5gs_2.5.5.77.9f4a9.tar.xz
36
+Checksums-Sha256:
37
+ 7cc3ad3522e3a99c3e51ecfaaa028817975917c299be4445183f99dd6fbce70a 13606744 open5gs_2.5.5.77.9f4a9.tar.xz
38
+Files:
39
+ d735dea25ad68a17c90c40ef20d9181e 13606744 open5gs_2.5.5.77.9f4a9.tar.xz
40
open5gs_2.5.5.76.bfd5c.tar.xz/.tarball-version -> open5gs_2.5.5.77.9f4a9.tar.xz/.tarball-version
Changed
4
1
2
-2.5.5.76-bfd5c
3
+2.5.5.77-9f4a9
4
open5gs_2.5.5.76.bfd5c.tar.xz/debian/changelog -> open5gs_2.5.5.77.9f4a9.tar.xz/debian/changelog
Changed
12
1
2
-open5gs (2.5.5.76.bfd5c) unstable; urgency=medium
3
+open5gs (2.5.5.77.9f4a9) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom master feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Sun, 08 Jan 2023 04:50:56 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Sun, 08 Jan 2023 05:20:45 +0000
9
10
open5gs (2.5.6) unstable; urgency=medium
11
12
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/amf-sm.c -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/amf-sm.c
Changed
26
1
2
break;
3
}
4
5
+ state = sbi_xact->state;
6
+
7
amf_ue = (amf_ue_t *)sbi_xact->sbi_object;
8
ogs_assert(amf_ue);
9
10
11
12
e->amf_ue = amf_ue;
13
e->h.sbi.message = &sbi_message;;
14
+ e->h.sbi.state = state;
15
16
ogs_fsm_dispatch(&amf_ue->sm, e);
17
} else {
18
19
e->amf_ue = amf_ue;
20
e->sess = sess;
21
e->h.sbi.message = &sbi_message;;
22
+ e->h.sbi.state = state;
23
24
amf_nnssf_nsselection_handle_get(sess, &sbi_message);
25
break;
26
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/context.c -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/context.c
Changed
39
1
2
ogs_pool_free(&ran_ue_pool, ran_ue);
3
4
stats_remove_ran_ue();
5
- if (ran_ue->amf_ue) {
6
- if (ran_ue->amf_ue->rm_state == RM_STATE_REGISTERED) {
7
- /* Start AMF_TIMER_MOBILE_REACHABLE
8
- * TS 24.501
9
- * 5.3.7 Handling of the periodic registration update timer and
10
- * mobile reachable timer
11
- * The network supervises the periodic registration update procedure
12
- * of the UE by means of the mobile reachable timer.
13
- * If the UE is not registered for emergency services,
14
- * the mobile reachable timer shall be longer than the value of timer
15
- * T3512. In this case, by default, the mobile reachable timer is
16
- * 4 minutes greater than the value of timer T3512.
17
- * The mobile reachable timer shall be reset and started with the
18
- * value as indicated above, when the AMF releases the NAS signalling
19
- * connection for the UE.
20
- * TODO: If the UE is registered for emergency services, the AMF shall
21
- * set the mobile reachable timer with a value equal to timer T3512.
22
- */
23
- ogs_timer_start(ran_ue->amf_ue->mobile_reachable.timer,
24
- ogs_time_from_sec(amf_self()->time.t3512.value + 240));
25
- }
26
- }
27
}
28
29
void ran_ue_switch_to_gnb(ran_ue_t *ran_ue, amf_gnb_t *new_gnb)
30
31
amf_ue->nas.amf.ksi = OGS_NAS_KSI_NO_KEY_IS_AVAILABLE;
32
amf_ue->abba_len = 2;
33
34
- amf_ue->rm_state = RM_STATE_DEREGISTERED;
35
-
36
amf_ue_fsm_init(amf_ue);
37
38
ogs_list_add(&self.amf_ue_list, amf_ue);
39
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/context.h -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/context.h
Changed
19
1
2
long cause;
3
} handover;
4
5
- /* Network Initiated De-Registration */
6
- bool network_initiated_de_reg;
7
-
8
/* SubscriptionId of Subscription to Data Change Notification to UDM */
9
char *data_change_subscription_id;
10
11
ogs_list_t sess_list;
12
-
13
-#define RM_STATE_DEREGISTERED 0
14
-#define RM_STATE_REGISTERED 1
15
- uint8_t rm_state;
16
};
17
18
typedef struct amf_sess_s {
19
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/gmm-handler.c -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/gmm-handler.c
Changed
10
1
2
ogs_assert(true ==
3
amf_ue_sbi_discover_and_send(
4
OGS_SBI_SERVICE_TYPE_NAUSF_AUTH, NULL,
5
- amf_nausf_auth_build_authenticate_confirmation, amf_ue, NULL));
6
+ amf_nausf_auth_build_authenticate_confirmation, amf_ue, 0, NULL));
7
8
return OGS_OK;
9
}
10
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/gmm-sm.c -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/gmm-sm.c
Changed
201
1
2
3
void gmm_state_de_registered(ogs_fsm_t *s, amf_event_t *e)
4
{
5
+ int i;
6
+
7
amf_ue_t *amf_ue = NULL;
8
amf_sess_t *sess = NULL;
9
10
ogs_sbi_message_t *sbi_message = NULL;
11
12
+ int state = 0;
13
+
14
ogs_assert(e);
15
16
if (e->sess) {
17
18
19
switch (e->h.id) {
20
case OGS_FSM_ENTRY_SIG:
21
+ ogs_assert(amf_ue->num_of_slice <= OGS_MAX_NUM_OF_SLICE);
22
+ for (i = 0; i < amf_ue->num_of_slice; i++) {
23
+ amf_metrics_inst_by_slice_add(&amf_ue->nr_tai.plmn_id,
24
+ &amf_ue->slicei.s_nssai,
25
+ AMF_METR_GAUGE_RM_REGISTEREDSUBNBR, -1);
26
+ }
27
AMF_UE_CLEAR_PAGING_INFO(amf_ue);
28
AMF_UE_CLEAR_N2_TRANSFER(amf_ue, pdu_session_resource_setup_request);
29
AMF_UE_CLEAR_5GSM_MESSAGE(amf_ue);
30
31
case OGS_EVENT_SBI_CLIENT:
32
sbi_message = e->h.sbi.message;
33
ogs_assert(sbi_message);
34
+ state = e->h.sbi.state;
35
36
SWITCH(sbi_message->h.service.name)
37
CASE(OGS_SBI_SERVICE_NAME_NAUSF_AUTH)
38
39
ogs_free(amf_ue->data_change_subscription_id);
40
amf_ue->data_change_subscription_id = NULL;
41
}
42
- if (amf_ue->network_initiated_de_reg) {
43
- amf_sbi_send_release_all_sessions(
44
- amf_ue, AMF_RELEASE_SM_CONTEXT_NO_STATE);
45
+
46
+ if (state == AMF_NETWORK_INITIATED_DE_REGISTERED) {
47
+ amf_sbi_send_release_all_sessions(amf_ue, state);
48
if ((ogs_list_count(&amf_ue->sess_list) == 0) &&
49
- (PCF_AM_POLICY_ASSOCIATED(amf_ue)))
50
- {
51
+ (PCF_AM_POLICY_ASSOCIATED(amf_ue))) {
52
ogs_assert(true ==
53
amf_ue_sbi_discover_and_send(
54
- OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL, NULL,
55
- amf_npcf_am_policy_control_build_delete, amf_ue, NULL));
56
+ OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL,
57
+ NULL,
58
+ amf_npcf_am_policy_control_build_delete,
59
+ amf_ue, state, NULL));
60
}
61
} else {
62
ogs_assert(true ==
63
amf_ue_sbi_discover_and_send(
64
OGS_SBI_SERVICE_TYPE_NAUSF_AUTH, NULL,
65
amf_nausf_auth_build_authenticate_delete,
66
- amf_ue, NULL));
67
+ amf_ue, state, NULL));
68
}
69
break;
70
DEFAULT
71
72
amf_ue_sbi_discover_and_send(
73
OGS_SBI_SERVICE_TYPE_NUDM_UECM, NULL,
74
amf_nudm_uecm_build_registration_delete,
75
- amf_ue, NULL));
76
+ amf_ue, state, NULL));
77
break;
78
DEFAULT
79
ogs_warn("%s Ignore invalid HTTP method %s",
80
81
break;
82
83
CASE(OGS_SBI_HTTP_METHOD_DELETE)
84
- if (!amf_ue->network_initiated_de_reg)
85
+ if (state != AMF_NETWORK_INITIATED_DE_REGISTERED)
86
ogs_assert(OGS_OK ==
87
nas_5gs_send_de_registration_accept(amf_ue));
88
89
- amf_ue->network_initiated_de_reg = false;
90
PCF_AM_POLICY_CLEAR(amf_ue);
91
break;
92
93
94
95
void gmm_state_registered(ogs_fsm_t *s, amf_event_t *e)
96
{
97
+ int i;
98
+
99
amf_ue_t *amf_ue = NULL;
100
amf_sess_t *sess = NULL;
101
102
103
104
switch (e->h.id) {
105
case OGS_FSM_ENTRY_SIG:
106
+ ogs_assert(amf_ue->num_of_slice <= OGS_MAX_NUM_OF_SLICE);
107
+ for (i = 0; i < amf_ue->num_of_slice; i++) {
108
+ amf_metrics_inst_by_slice_add(&amf_ue->nr_tai.plmn_id,
109
+ &amf_ue->slicei.s_nssai,
110
+ AMF_METR_GAUGE_RM_REGISTEREDSUBNBR, 1);
111
+ }
112
break;
113
case OGS_FSM_EXIT_SIG:
114
break;
115
116
break;
117
118
case AMF_TIMER_MOBILE_REACHABLE:
119
- ogs_info("%s Mobile Reachable timer expired", amf_ue->supi);
120
+ ogs_info("%s Mobile Reachable Timer Expired", amf_ue->supi);
121
/* Clear mobile_reachable Timers */
122
CLEAR_AMF_UE_TIMER(amf_ue->mobile_reachable);
123
/* Start AMF_TIMER_IMPLICIT_DEREGISTRATION
124
125
ogs_time_from_sec(amf_self()->time.t3512.value + 240));
126
break;
127
case AMF_TIMER_IMPLICIT_DEREGISTRATION:
128
- ogs_info("%s Implicit de-reg timer expired, de-register UE",
129
- amf_ue->supi);
130
+ ogs_info("%s Do Network-Initiated De-Register UE", amf_ue->supi);
131
/* Clear implicit_deregistration Timers */
132
CLEAR_AMF_UE_TIMER(amf_ue->implicit_deregistration);
133
/* Implicitly de-register UE
134
135
*/
136
ogs_assert(true == amf_ue_sbi_discover_and_send(
137
OGS_SBI_SERVICE_TYPE_NUDM_SDM, NULL,
138
- amf_nudm_sdm_build_subscription_delete, amf_ue, NULL));
139
- amf_ue->network_initiated_de_reg = true;
140
- amf_ue->rm_state = RM_STATE_DEREGISTERED;
141
+ amf_nudm_sdm_build_subscription_delete,
142
+ amf_ue, AMF_NETWORK_INITIATED_DE_REGISTERED, NULL));
143
OGS_FSM_TRAN(s, &gmm_state_de_registered);
144
break;
145
default:
146
147
148
static void common_register_state(ogs_fsm_t *s, amf_event_t *e)
149
{
150
- int rv, i, xact_count = 0;
151
+ int rv, xact_count = 0;
152
ogs_nas_5gmm_cause_t gmm_cause;
153
154
amf_ue_t *amf_ue = NULL;
155
156
OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL,
157
NULL,
158
amf_npcf_am_policy_control_build_create,
159
- amf_ue, NULL));
160
+ amf_ue, 0, NULL));
161
OGS_FSM_TRAN(s, &gmm_state_initial_context_setup);
162
break;
163
}
164
165
ogs_assert(true ==
166
amf_ue_sbi_discover_and_send(
167
OGS_SBI_SERVICE_TYPE_NAUSF_AUTH, NULL,
168
- amf_nausf_auth_build_authenticate, amf_ue, NULL));
169
+ amf_nausf_auth_build_authenticate,
170
+ amf_ue, 0, NULL));
171
}
172
173
OGS_FSM_TRAN(s, &gmm_state_authentication);
174
175
ogs_assert(true ==
176
amf_ue_sbi_discover_and_send(
177
OGS_SBI_SERVICE_TYPE_NAUSF_AUTH, NULL,
178
- amf_nausf_auth_build_authenticate, amf_ue, NULL));
179
+ amf_nausf_auth_build_authenticate,
180
+ amf_ue, 0, NULL));
181
}
182
183
OGS_FSM_TRAN(s, &gmm_state_authentication);
184
185
186
gmm_handle_deregistration_request(
187
amf_ue, &nas_message->gmm.deregistration_request_from_ue);
188
- ogs_assert(amf_ue->num_of_slice <= OGS_MAX_NUM_OF_SLICE);
189
- for (i = 0; i < amf_ue->num_of_slice; i++) {
190
- amf_metrics_inst_by_slice_add(&amf_ue->nr_tai.plmn_id,
191
- &amf_ue->slicei.s_nssai,
192
- AMF_METR_GAUGE_RM_REGISTEREDSUBNBR, -1);
193
- }
194
- amf_ue->rm_state = RM_STATE_DEREGISTERED;
195
OGS_FSM_TRAN(s, &gmm_state_de_registered);
196
break;
197
198
199
NGAP_Cause_PR_misc, NGAP_CauseMisc_om_intervention,
200
NGAP_UE_CTX_REL_NG_CONTEXT_REMOVE, 0));
201
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/namf-handler.c -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/namf-handler.c
Changed
111
1
2
return OGS_OK;
3
}
4
5
-static int network_deregister (
6
- amf_ue_t *amf_ue, OpenAPI_deregistration_reason_e dereg_reason) {
7
+static int do_network_initiated_de_register(
8
+ amf_ue_t *amf_ue, OpenAPI_deregistration_reason_e dereg_reason)
9
+{
10
if ((CM_CONNECTED(amf_ue)) &&
11
- (OGS_FSM_CHECK(&amf_ue->sm, gmm_state_registered)))
12
- {
13
- amf_ue->network_initiated_de_reg = true;
14
+ (OGS_FSM_CHECK(&amf_ue->sm, gmm_state_registered))) {
15
16
ogs_assert(OGS_OK ==
17
nas_5gs_send_de_registration_request(amf_ue, dereg_reason));
18
19
amf_sbi_send_release_all_sessions(
20
- amf_ue, AMF_RELEASE_SM_CONTEXT_NO_STATE);
21
+ amf_ue, AMF_NETWORK_INITIATED_DE_REGISTERED);
22
23
if ((ogs_list_count(&amf_ue->sess_list) == 0) &&
24
- (PCF_AM_POLICY_ASSOCIATED(amf_ue)))
25
- {
26
+ (PCF_AM_POLICY_ASSOCIATED(amf_ue))) {
27
ogs_assert(true ==
28
amf_ue_sbi_discover_and_send(
29
OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL, NULL,
30
- amf_npcf_am_policy_control_build_delete, amf_ue, NULL));
31
+ amf_npcf_am_policy_control_build_delete,
32
+ amf_ue, AMF_NETWORK_INITIATED_DE_REGISTERED, NULL));
33
}
34
35
OGS_FSM_TRAN(&amf_ue->sm, &gmm_state_de_registered);
36
return OGS_OK;
37
- }
38
- else if (CM_IDLE(amf_ue)) {
39
+
40
+ } else if (CM_IDLE(amf_ue)) {
41
/* TODO: need to page UE */
42
- /*ngap_send_paging(amf_ue);*/
43
- return OGS_OK;
44
+ ogs_error("Not implemented : need to page UE");
45
+ return OGS_ERROR;
46
} else {
47
- return OGS_ERROR;
48
+ ogs_fatal("Invalid State");
49
+ ogs_assert_if_reached();
50
+ return OGS_ERROR;
51
}
52
}
53
54
55
* session associated with non-emergency service as described in clause 4.3.4.
56
*/
57
58
- if (network_deregister(
59
- amf_ue, DeregistrationData->dereg_reason) == -1) {
60
+ if (do_network_initiated_de_register(
61
+ amf_ue, DeregistrationData->dereg_reason) != OGS_OK) {
62
status = OGS_SBI_HTTP_STATUS_BAD_REQUEST;
63
ogs_error("%s Deregistration notification for UE in wrong state",
64
amf_ue->supi);
65
66
}
67
68
69
- OpenAPI_list_for_each(ModificationNotification->notify_items, node)
70
- {
71
+ OpenAPI_list_for_each(ModificationNotification->notify_items, node) {
72
OpenAPI_notify_item_t *item = node->data;
73
74
char *saveptr = NULL;
75
76
CASE(OGS_SBI_RESOURCE_NAME_AM_DATA)
77
OpenAPI_lnode_t *node_ci;
78
79
- OpenAPI_list_for_each(item->changes, node_ci)
80
- {
81
+ OpenAPI_list_for_each(item->changes, node_ci) {
82
OpenAPI_change_item_t *change_item = node_ci->data;
83
- if (update_rat_res(change_item, amf_ue->rat_restrictions)
84
- || update_ambr(change_item, &amf_ue->ue_ambr,
85
- &ambr_changed)) {
86
+ if (update_rat_res(change_item, amf_ue->rat_restrictions) ||
87
+ update_ambr(change_item, &amf_ue->ue_ambr,
88
+ &ambr_changed)) {
89
status = OGS_SBI_HTTP_STATUS_BAD_REQUEST;
90
goto cleanup;
91
}
92
93
}
94
95
if (amf_ue_is_rat_restricted(amf_ue)) {
96
- if (network_deregister(amf_ue, OpenAPI_deregistration_reason_REREGISTRATION_REQUIRED) == -1) {
97
+ if (do_network_initiated_de_register(amf_ue,
98
+ OpenAPI_deregistration_reason_REREGISTRATION_REQUIRED) != OGS_OK) {
99
status = OGS_SBI_HTTP_STATUS_BAD_REQUEST;
100
ogs_error("%s Deregistration notification for UE in wrong state",
101
amf_ue->supi);
102
103
ogs_assert(true ==
104
amf_ue_sbi_discover_and_send(
105
OGS_SBI_SERVICE_TYPE_NUDM_SDM, NULL,
106
- amf_nudm_sdm_build_subscription_delete, amf_ue, NULL));
107
+ amf_nudm_sdm_build_subscription_delete, amf_ue, 0, NULL));
108
} else if (ambr_changed) {
109
ogs_pkbuf_t *ngapbuf;
110
111
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/ngap-handler.c -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/ngap-handler.c
Changed
34
1
2
* to prevent retransmission of NAS messages.
3
*/
4
CLEAR_AMF_UE_ALL_TIMERS(amf_ue);
5
+
6
+ /*
7
+ * TS 24.501
8
+ * 5.3.7 Handling of the periodic registration update timer and
9
+ *
10
+ * Start AMF_TIMER_MOBILE_REACHABLE
11
+ * mobile reachable timer
12
+ * The network supervises the periodic registration update procedure
13
+ * of the UE by means of the mobile reachable timer.
14
+ * If the UE is not registered for emergency services,
15
+ * the mobile reachable timer shall be longer than the value of timer
16
+ * T3512. In this case, by default, the mobile reachable timer is
17
+ * 4 minutes greater than the value of timer T3512.
18
+ * The mobile reachable timer shall be reset and started with the
19
+ * value as indicated above, when the AMF releases the NAS signalling
20
+ * connection for the UE.
21
+ *
22
+ * TODO: If the UE is registered for emergency services, the AMF shall
23
+ * set the mobile reachable timer with a value equal to timer T3512.
24
+ */
25
+ if (OGS_FSM_CHECK(&amf_ue->sm, gmm_state_registered) &&
26
+ ran_ue->ue_ctx_rel_action == NGAP_UE_CTX_REL_NG_REMOVE_AND_UNLINK) {
27
+
28
+ ogs_timer_start(amf_ue->mobile_reachable.timer,
29
+ ogs_time_from_sec(amf_self()->time.t3512.value + 240));
30
+ }
31
}
32
33
switch (ran_ue->ue_ctx_rel_action) {
34
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/nsmf-handler.c -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/nsmf-handler.c
Changed
49
1
2
OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL,
3
NULL,
4
amf_npcf_am_policy_control_build_create,
5
- amf_ue, NULL));
6
+ amf_ue, 0, NULL));
7
} else {
8
CLEAR_AMF_UE_TIMER(amf_ue->t3550);
9
ogs_assert(OGS_OK ==
10
11
ogs_assert(true ==
12
amf_ue_sbi_discover_and_send(
13
OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL, NULL,
14
- amf_npcf_am_policy_control_build_create, amf_ue, NULL));
15
+ amf_npcf_am_policy_control_build_create,
16
+ amf_ue, 0, NULL));
17
} else {
18
CLEAR_AMF_UE_TIMER(amf_ue->t3550);
19
ogs_assert(OGS_OK ==
20
21
/* Not reached here */
22
ogs_assert_if_reached();
23
24
- } else if (state == AMF_RELEASE_SM_CONTEXT_NO_STATE) {
25
+ } else if (state == AMF_RELEASE_SM_CONTEXT_NO_STATE ||
26
+ state == AMF_NETWORK_INITIATED_DE_REGISTERED) {
27
/* NO_STATE */
28
29
if (OGS_FSM_CHECK(&amf_ue->sm, gmm_state_authentication)) {
30
31
ogs_assert(true ==
32
amf_ue_sbi_discover_and_send(
33
OGS_SBI_SERVICE_TYPE_NAUSF_AUTH, NULL,
34
- amf_nausf_auth_build_authenticate, amf_ue, NULL));
35
+ amf_nausf_auth_build_authenticate,
36
+ amf_ue, 0, NULL));
37
38
} else if (OGS_FSM_CHECK(&amf_ue->sm,
39
gmm_state_de_registered)) {
40
41
amf_ue_sbi_discover_and_send(
42
OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL, NULL,
43
amf_npcf_am_policy_control_build_delete,
44
- amf_ue, NULL));
45
+ amf_ue, state, NULL));
46
47
} else if (OGS_FSM_CHECK(&amf_ue->sm, gmm_state_registered)) {
48
/*
49
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/nudm-handler.c -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/nudm-handler.c
Changed
57
1
2
#include "nas-path.h"
3
4
int amf_nudm_sdm_handle_provisioned(
5
- amf_ue_t *amf_ue, ogs_sbi_message_t *recvmsg)
6
+ amf_ue_t *amf_ue, int state, ogs_sbi_message_t *recvmsg)
7
{
8
int i;
9
10
11
amf_ue_sbi_discover_and_send(
12
OGS_SBI_SERVICE_TYPE_NUDM_SDM, NULL,
13
amf_nudm_sdm_build_get,
14
- amf_ue, (char *)OGS_SBI_RESOURCE_NAME_SMF_SELECT_DATA));
15
+ amf_ue, state, (char *)OGS_SBI_RESOURCE_NAME_SMF_SELECT_DATA));
16
break;
17
18
CASE(OGS_SBI_RESOURCE_NAME_SMF_SELECT_DATA)
19
20
amf_ue_sbi_discover_and_send(
21
OGS_SBI_SERVICE_TYPE_NUDM_SDM, NULL,
22
amf_nudm_sdm_build_get,
23
- amf_ue, (char *)OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA));
24
+ amf_ue, state,
25
+ (char *)OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA));
26
break;
27
28
CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXT_IN_SMF_DATA)
29
30
ogs_assert(true ==
31
amf_ue_sbi_discover_and_send(
32
OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL, NULL,
33
- amf_npcf_am_policy_control_build_create, amf_ue, NULL));
34
+ amf_npcf_am_policy_control_build_create,
35
+ amf_ue, state, NULL));
36
}
37
else {
38
ogs_assert(true ==
39
amf_ue_sbi_discover_and_send(
40
OGS_SBI_SERVICE_TYPE_NUDM_SDM, NULL,
41
- amf_nudm_sdm_build_subscription, amf_ue,
42
- (char *)OGS_SBI_RESOURCE_NAME_AM_DATA));
43
+ amf_nudm_sdm_build_subscription,
44
+ amf_ue, state, (char *)OGS_SBI_RESOURCE_NAME_AM_DATA));
45
}
46
break;
47
48
49
ogs_assert(true ==
50
amf_ue_sbi_discover_and_send(
51
OGS_SBI_SERVICE_TYPE_NPCF_AM_POLICY_CONTROL, NULL,
52
- amf_npcf_am_policy_control_build_create, amf_ue, NULL));
53
+ amf_npcf_am_policy_control_build_create, amf_ue, state, NULL));
54
break;
55
56
DEFAULT
57
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/nudm-handler.h -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/nudm-handler.h
Changed
10
1
2
#include "context.h"
3
4
int amf_nudm_sdm_handle_provisioned(
5
- amf_ue_t *amf_ue, ogs_sbi_message_t *recvmsg);
6
+ amf_ue_t *amf_ue, int state, ogs_sbi_message_t *recvmsg);
7
8
#ifdef __cplusplus
9
}
10
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/sbi-path.c -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/sbi-path.c
Changed
19
1
2
ogs_sbi_service_type_e service_type,
3
ogs_sbi_discovery_option_t *discovery_option,
4
ogs_sbi_request_t *(*build)(amf_ue_t *amf_ue, void *data),
5
- amf_ue_t *amf_ue, void *data)
6
+ amf_ue_t *amf_ue, int state, void *data)
7
{
8
ogs_sbi_xact_t *xact = NULL;
9
10
11
return false;
12
}
13
14
+ xact->state = state;
15
+
16
if (ogs_sbi_discover_and_send(xact) != true) {
17
ogs_error("amf_ue_sbi_discover_and_send() failed");
18
ogs_sbi_xact_remove(xact);
19
open5gs_2.5.5.76.bfd5c.tar.xz/src/amf/sbi-path.h -> open5gs_2.5.5.77.9f4a9.tar.xz/src/amf/sbi-path.h
Changed
31
1
2
3
bool amf_sbi_send_request(
4
ogs_sbi_nf_instance_t *nf_instance, ogs_sbi_xact_t *xact);
5
-bool amf_ue_sbi_discover_and_send(
6
- ogs_sbi_service_type_e service_type,
7
- ogs_sbi_discovery_option_t *discovery_option,
8
- ogs_sbi_request_t *(*build)(amf_ue_t *amf_ue, void *data),
9
- amf_ue_t *amf_ue, void *data);
10
11
#define AMF_CREATE_SM_CONTEXT_NO_STATE 0
12
+
13
+#define AMF_NETWORK_INITIATED_DE_REGISTERED 1
14
+
15
#define AMF_UPDATE_SM_CONTEXT_ACTIVATED 11
16
#define AMF_UPDATE_SM_CONTEXT_SETUP_FAIL 12
17
#define AMF_UPDATE_SM_CONTEXT_DEACTIVATED 13
18
19
#define AMF_REMOVE_S1_CONTEXT_BY_LO_CONNREFUSED 51
20
#define AMF_REMOVE_S1_CONTEXT_BY_RESET_ALL 52
21
#define AMF_REMOVE_S1_CONTEXT_BY_RESET_PARTIAL 53
22
+
23
+bool amf_ue_sbi_discover_and_send(
24
+ ogs_sbi_service_type_e service_type,
25
+ ogs_sbi_discovery_option_t *discovery_option,
26
+ ogs_sbi_request_t *(*build)(amf_ue_t *amf_ue, void *data),
27
+ amf_ue_t *amf_ue, int state, void *data);
28
bool amf_sess_sbi_discover_and_send(
29
ogs_sbi_service_type_e service_type,
30
ogs_sbi_discovery_option_t *discovery_option,
31