Changes of Revision 974
open5gs_2.7.2.4616.ba05.202502192026.dsc -> open5gs_2.7.2.4617.6a22.202502202026.dsc
Changed
x
1
2
Source: open5gs
3
Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
4
Architecture: any
5
-Version: 2.7.2.4616.ba05.202502192026
6
+Version: 2.7.2.4617.6a22.202502202026
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
- fd1ab99ce38fbd5049f8a7fadeae3ba2a8f0e3b4 14525752 open5gs_2.7.2.4616.ba05.202502192026.tar.xz
15
+ c2a3bb28aae18932a2990fbaf3290c9d2a48e427 14526944 open5gs_2.7.2.4617.6a22.202502202026.tar.xz
16
Checksums-Sha256:
17
- 964014513327ac654eaa4c5af14431c157fa0e723bb4b57b7b8bda864880399c 14525752 open5gs_2.7.2.4616.ba05.202502192026.tar.xz
18
+ e43e9a07b6554e0d1e4a124098aa08e1af5ae7a8588bdf3b42fac47bcd9a8631 14526944 open5gs_2.7.2.4617.6a22.202502202026.tar.xz
19
Files:
20
- a3757c6d259b0a533eb0e1e6a66b2943 14525752 open5gs_2.7.2.4616.ba05.202502192026.tar.xz
21
+ 1cb0341baa94282f657229ce010de221 14526944 open5gs_2.7.2.4617.6a22.202502202026.tar.xz
22
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/.tarball-version -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/.tarball-version
Changed
4
1
2
-2.7.2.4616-ba05.202502192026
3
+2.7.2.4617-6a22.202502202026
4
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/debian/changelog -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/debian/changelog
Changed
12
1
2
-open5gs (2.7.2.4616.ba05.202502192026) unstable; urgency=medium
3
+open5gs (2.7.2.4617.6a22.202502202026) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom nightly feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Wed, 19 Feb 2025 20:27:56 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Thu, 20 Feb 2025 20:27:55 +0000
9
10
open5gs (2.7.2) unstable; urgency=medium
11
12
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/lib/sbi/custom/links.c -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/lib/sbi/custom/links.c
Changed
69
1
2
ogs_assert(linksJSON);
3
4
cJSON_AddItemToObject(linksJSON, "items", itemsJSON);
5
- cJSON_AddItemToObject(linksJSON, "self", selfJSON);
6
+ cJSON_AddItemToObject(linksJSON, "self", selfJSON);
7
+ cJSON_AddNumberToObject(linksJSON, "totalItemCount", cJSON_GetArraySize(itemsJSON));
8
9
/* root */
10
root = cJSON_CreateObject();
11
12
13
return root;
14
}
15
+
16
+ogs_sbi_links_t *ogs_sbi_links_parseFromJSON(cJSON *json)
17
+{
18
+ ogs_sbi_links_t *links;
19
+ cJSON *_links = NULL;
20
+ cJSON *_items = NULL, *_item = NULL;
21
+ cJSON *_self = NULL;
22
+
23
+ ogs_assert(json);
24
+
25
+ _links = cJSON_GetObjectItemCaseSensitive(json, "_links");
26
+ if (!_links) {
27
+ ogs_error("No _links");
28
+ return NULL;
29
+ }
30
+
31
+ _items = cJSON_GetObjectItemCaseSensitive(_links, "items");
32
+ if (!_items) {
33
+ ogs_error("No items");
34
+ return NULL;
35
+ }
36
+
37
+
38
+ links = ogs_malloc(sizeof(ogs_sbi_links_t));
39
+ ogs_assert(links);
40
+
41
+ memset(links, 0, sizeof(*links));
42
+ links->items = OpenAPI_list_create();
43
+ ogs_assert(links->items);
44
+
45
+
46
+ cJSON_ArrayForEach(_item, _items) {
47
+ cJSON *href;
48
+ char *link;
49
+
50
+ href = cJSON_GetObjectItemCaseSensitive(_item, "href");
51
+ if (href) {
52
+ link = cJSON_GetStringValue(href);
53
+ OpenAPI_list_add(links->items, ogs_strdup(link));
54
+ }
55
+ }
56
+
57
+
58
+ _self = cJSON_GetObjectItemCaseSensitive(_links, "self");
59
+ if (_self) {
60
+ cJSON *self_href;
61
+
62
+ self_href = cJSON_GetObjectItemCaseSensitive(_self, "href");
63
+ if (self_href)
64
+ links->self = ogs_strdup(cJSON_GetStringValue(self_href));
65
+ }
66
+
67
+ return links;
68
+}
69
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/lib/sbi/custom/links.h -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/lib/sbi/custom/links.h
Changed
9
1
2
} ogs_sbi_links_t;
3
4
cJSON *ogs_sbi_links_convertToJSON(ogs_sbi_links_t *links);
5
+ogs_sbi_links_t *ogs_sbi_links_parseFromJSON(cJSON *json);
6
7
#ifdef __cplusplus
8
}
9
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/lib/sbi/message.c -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/lib/sbi/message.c
Changed
50
1
2
OpenAPI_ue_reg_status_update_req_data_free(message->UeRegStatusUpdateReqData);
3
if (message->UeRegStatusUpdateRspData)
4
OpenAPI_ue_reg_status_update_rsp_data_free(message->UeRegStatusUpdateRspData);
5
+ if (message->links) {
6
+ OpenAPI_clear_and_free_string_list(message->links->items);
7
+ if (message->links->self)
8
+ ogs_free(message->links->self);
9
+
10
+ ogs_free(message->links);
11
+ }
12
13
/* HTTP Part */
14
for (i = 0; i < message->num_of_part; i++) {
15
16
17
SWITCH(message->h.resource.component0)
18
CASE(OGS_SBI_RESOURCE_NAME_NF_INSTANCES)
19
- if (message->res_status < 300) {
20
- message->NFProfile =
21
- OpenAPI_nf_profile_parseFromJSON(item);
22
- if (!message->NFProfile) {
23
- rv = OGS_ERROR;
24
- ogs_error("JSON parse error");
25
+ if (message->h.resource.component1) {
26
+ if (message->res_status < 300) {
27
+ message->NFProfile =
28
+ OpenAPI_nf_profile_parseFromJSON(item);
29
+ if (!message->NFProfile) {
30
+ rv = OGS_ERROR;
31
+ ogs_error("JSON parse error");
32
+ }
33
+ } else {
34
+ ogs_error("HTTP ERROR Status : %d", message->res_status);
35
}
36
} else {
37
- ogs_error("HTTP ERROR Status : %d", message->res_status);
38
+ if (message->res_status < 300) {
39
+ message->links = ogs_sbi_links_parseFromJSON(item);
40
+ if (!message->links) {
41
+ rv = OGS_ERROR;
42
+ ogs_error("JSON parse error");
43
+ }
44
+ } else {
45
+ ogs_error("HTTP ERROR Status : %d", message->res_status);
46
+ }
47
}
48
break;
49
50
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/lib/sbi/nf-sm.c -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/lib/sbi/nf-sm.c
Changed
181
1
2
3
#include "ogs-sbi.h"
4
5
+static void handle_nf_profile_retrieval(
6
+ char *nf_instance_id,
7
+ OpenAPI_nf_profile_t *NFProfile)
8
+{
9
+ ogs_sbi_nf_instance_t *nf_instance;
10
+ ogs_sbi_subscription_spec_t *subscription_spec = NULL;
11
+ bool save = false;
12
+
13
+ ogs_assert(nf_instance_id);
14
+ ogs_assert(NFProfile);
15
+
16
+ nf_instance = ogs_sbi_nf_instance_find(nf_instance_id);
17
+ if (nf_instance) {
18
+ /* already have this nf_instance; done */
19
+ return;
20
+ }
21
+
22
+ if (NF_INSTANCE_ID_IS_SELF(nf_instance_id)) {
23
+ /* don't save ourselves */
24
+ return;
25
+ }
26
+
27
+ nf_instance = ogs_sbi_nf_instance_add();
28
+ ogs_assert(nf_instance);
29
+
30
+ ogs_sbi_nf_instance_set_id(nf_instance, nf_instance_id);
31
+
32
+ ogs_nnrf_nfm_handle_nf_profile(nf_instance, NFProfile);
33
+
34
+ /* verify against our subscription list that we want to save this
35
+ * nf instance to our context */
36
+ ogs_list_for_each(&ogs_sbi_self()->subscription_spec_list, subscription_spec) {
37
+ ogs_sbi_nf_service_t *nf_service = NULL;
38
+
39
+ if (subscription_spec->subscr_cond.nf_type == nf_instance->nf_type) {
40
+ /* ok; save the nf_instance */
41
+ save = true;
42
+ break;
43
+ }
44
+
45
+ ogs_list_for_each(&nf_instance->nf_service_list, nf_service) {
46
+ if (subscription_spec->subscr_cond.service_name &&
47
+ nf_service->name &&
48
+ !strcmp(subscription_spec->subscr_cond.service_name, nf_service->name))
49
+ {
50
+ /* ok; save the nf_instance */
51
+ save = true;
52
+ break;
53
+ }
54
+ }
55
+
56
+ if (save)
57
+ break;
58
+ }
59
+
60
+ if (!save) {
61
+ ogs_sbi_nf_instance_remove(nf_instance);
62
+ } else {
63
+ ogs_sbi_nf_fsm_init(nf_instance);
64
+ ogs_info("%s (NRF-profile-get) NF registered", nf_instance->id);
65
+ ogs_sbi_client_associate(nf_instance);
66
+ }
67
+}
68
+
69
+static void handle_nf_list_retrieval(ogs_sbi_links_t *links)
70
+{
71
+ ogs_sbi_header_t header;
72
+ ogs_sbi_message_t msg;
73
+ OpenAPI_lnode_t *node = NULL;
74
+
75
+ OpenAPI_list_for_each(links->items, node) {
76
+
77
+ memset(&header, 0, sizeof(header));
78
+ header.uri = node->data;
79
+
80
+ if (ogs_sbi_parse_header(&msg, &header) != OGS_OK) {
81
+ ogs_error("Cannot parse href: %s", header.uri);
82
+ continue;
83
+ }
84
+
85
+ if (msg.h.resource.component1)
86
+ ogs_nnrf_nfm_send_nf_profile_get(msg.h.resource.component1);
87
+
88
+ ogs_sbi_header_free(&header);
89
+ }
90
+}
91
+
92
void ogs_sbi_nf_fsm_init(ogs_sbi_nf_instance_t *nf_instance)
93
{
94
ogs_event_t e;
95
96
subscription_spec->subscr_cond.nf_type,
97
subscription_spec->subscr_cond.service_name);
98
}
99
+
100
+ ogs_nnrf_nfm_send_nf_list_retrieve();
101
}
102
break;
103
104
105
SWITCH(message->h.resource.component0)
106
CASE(OGS_SBI_RESOURCE_NAME_NF_INSTANCES)
107
108
- if (message->res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT ||
109
- message->res_status == OGS_SBI_HTTP_STATUS_OK) {
110
- if (nf_instance->time.heartbeat_interval)
111
- ogs_timer_start(nf_instance->t_no_heartbeat,
112
- ogs_time_from_sec(
113
- nf_instance->time.heartbeat_interval +
114
- ogs_local_conf()->time.nf_instance.
115
- no_heartbeat_margin));
116
+ if (message->h.resource.component1) {
117
+ SWITCH(message->h.method)
118
+ CASE(OGS_SBI_HTTP_METHOD_PATCH)
119
+ if (message->res_status == OGS_SBI_HTTP_STATUS_NO_CONTENT ||
120
+ message->res_status == OGS_SBI_HTTP_STATUS_OK) {
121
+
122
+ if (nf_instance->time.heartbeat_interval)
123
+ ogs_timer_start(nf_instance->t_no_heartbeat,
124
+ ogs_time_from_sec(
125
+ nf_instance->time.heartbeat_interval +
126
+ ogs_local_conf()->time.nf_instance.
127
+ no_heartbeat_margin));
128
+
129
+ } else {
130
+ ogs_warn("%s HTTP response error %d",
131
+ NF_INSTANCE_ID(ogs_sbi_self()->nf_instance),
132
+ message->res_status);
133
+ OGS_FSM_TRAN(s, &ogs_sbi_nf_state_exception);
134
+ }
135
+ break;
136
+
137
+ CASE(OGS_SBI_HTTP_METHOD_GET)
138
+ if (message->res_status == OGS_SBI_HTTP_STATUS_OK) {
139
+ if (!message->h.resource.component1) {
140
+ ogs_error("No NFInstanceId");
141
+ break;
142
+ }
143
+ if (!message->NFProfile) {
144
+ ogs_error("No NFProfile");
145
+ break;
146
+ }
147
+ handle_nf_profile_retrieval(
148
+ message->h.resource.component1,
149
+ message->NFProfile);
150
+ } else {
151
+ ogs_warn("%s HTTP response error %d",
152
+ NF_INSTANCE_ID(ogs_sbi_self()->nf_instance),
153
+ message->res_status);
154
+ OGS_FSM_TRAN(s, &ogs_sbi_nf_state_exception);
155
+ }
156
+ break;
157
+ DEFAULT
158
+ ogs_error("Unknown method %s", message->h.method);
159
+ break;
160
+ END
161
} else {
162
- ogs_warn("%s HTTP response error %d",
163
- NF_INSTANCE_ID(ogs_sbi_self()->nf_instance),
164
- message->res_status);
165
- OGS_FSM_TRAN(s, &ogs_sbi_nf_state_exception);
166
+ if (!message->links) {
167
+ ogs_warn("No links");
168
+ break;
169
+ }
170
+ if (message->res_status != OGS_SBI_HTTP_STATUS_OK) {
171
+ ogs_warn("%s HTTP response error %d",
172
+ NF_INSTANCE_ID(ogs_sbi_self()->nf_instance),
173
+ message->res_status);
174
+ break;
175
+ }
176
+
177
+ handle_nf_list_retrieval(message->links);
178
}
179
180
break;
181
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/lib/sbi/nnrf-build.c -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/lib/sbi/nnrf-build.c
Changed
26
1
2
return request;
3
}
4
5
+ogs_sbi_request_t *ogs_nnrf_nfm_build_nflist_retrieve(void)
6
+{
7
+ ogs_sbi_message_t message;
8
+ ogs_sbi_request_t *request = NULL;
9
+
10
+ memset(&message, 0, sizeof(message));
11
+ message.h.method = (char *)OGS_SBI_HTTP_METHOD_GET;
12
+ message.h.service.name = (char *)OGS_SBI_SERVICE_NAME_NNRF_NFM;
13
+ message.h.api.version = (char *)OGS_SBI_API_V1;
14
+ message.h.resource.component0 =
15
+ (char *)OGS_SBI_RESOURCE_NAME_NF_INSTANCES;
16
+
17
+ request = ogs_sbi_build_request(&message);
18
+ ogs_expect(request);
19
+
20
+ return request;
21
+}
22
+
23
ogs_sbi_request_t *ogs_nnrf_disc_build_discover(
24
OpenAPI_nf_type_e target_nf_type,
25
OpenAPI_nf_type_e requester_nf_type,
26
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/lib/sbi/nnrf-build.h -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/lib/sbi/nnrf-build.h
Changed
9
1
2
ogs_sbi_request_t *ogs_nnrf_nfm_build_status_unsubscribe(
3
ogs_sbi_subscription_data_t *subscription_data);
4
ogs_sbi_request_t *ogs_nnrf_nfm_build_profile_retrieve(char *nf_instance_id);
5
+ogs_sbi_request_t *ogs_nnrf_nfm_build_nflist_retrieve(void);
6
7
ogs_sbi_request_t *ogs_nnrf_disc_build_discover(
8
OpenAPI_nf_type_e target_nf_type,
9
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/lib/sbi/nnrf-path.c -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/lib/sbi/nnrf-path.c
Changed
47
1
2
3
return rc;
4
}
5
+
6
+bool ogs_nnrf_nfm_send_nf_list_retrieve(void)
7
+{
8
+ bool rc;
9
+ ogs_sbi_request_t *request = NULL;
10
+
11
+ request = ogs_nnrf_nfm_build_nflist_retrieve();
12
+ if (!request) {
13
+ ogs_error("No Request");
14
+ return false;
15
+ }
16
+
17
+ rc = ogs_sbi_send_request_to_nrf(
18
+ OGS_SBI_SERVICE_TYPE_NNRF_NFM, NULL,
19
+ ogs_sbi_client_handler, request, ogs_sbi_self()->nf_instance);
20
+ ogs_expect(rc == true);
21
+
22
+ ogs_sbi_request_free(request);
23
+
24
+ return rc;
25
+}
26
+
27
+bool ogs_nnrf_nfm_send_nf_profile_get(char *nf_instance_id)
28
+{
29
+ bool rc;
30
+ ogs_sbi_request_t *request = NULL;
31
+
32
+ request = ogs_nnrf_nfm_build_profile_retrieve(nf_instance_id);
33
+ if (!request) {
34
+ ogs_error("No Request");
35
+ return false;
36
+ }
37
+
38
+ rc = ogs_sbi_send_request_to_nrf(
39
+ OGS_SBI_SERVICE_TYPE_NNRF_NFM, NULL,
40
+ ogs_sbi_client_handler, request, ogs_sbi_self()->nf_instance);
41
+ ogs_expect(rc == true);
42
+
43
+ ogs_sbi_request_free(request);
44
+
45
+ return rc;
46
+}
47
open5gs_2.7.2.4616.ba05.202502192026.tar.xz/lib/sbi/nnrf-path.h -> open5gs_2.7.2.4617.6a22.202502202026.tar.xz/lib/sbi/nnrf-path.h
Changed
10
1
2
ogs_sbi_subscription_data_t *subscription_data);
3
bool ogs_nnrf_nfm_send_nf_status_unsubscribe(
4
ogs_sbi_subscription_data_t *subscription_data);
5
+bool ogs_nnrf_nfm_send_nf_list_retrieve(void);
6
+bool ogs_nnrf_nfm_send_nf_profile_get(char *nf_instance_id);
7
8
bool ogs_nnrf_nfm_send_to_nrf(
9
ogs_sbi_client_t *client, ogs_sbi_client_cb_f client_cb,
10