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 805
open5gs_2.7.2.4491.deef.202409022026.dsc -> open5gs_2.7.2.4505.4308.202409032026.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.4491.deef.202409022026
6
+Version: 2.7.2.4505.4308.202409032026
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
- f7e29a3c393098c9187348d14699295925f687b5 14503860 open5gs_2.7.2.4491.deef.202409022026.tar.xz
15
+ 3449733df8b6ddaa731a283126f2237787a09d9f 14505556 open5gs_2.7.2.4505.4308.202409032026.tar.xz
16
Checksums-Sha256:
17
- da0f9955d8100e31b5c67eca6f63fd6be956a066d3fc5ed28184be28917ffe37 14503860 open5gs_2.7.2.4491.deef.202409022026.tar.xz
18
+ b8efe4c950f7b141ebaafd8306d4b2f0d317d42c1543194014c0326389a03606 14505556 open5gs_2.7.2.4505.4308.202409032026.tar.xz
19
Files:
20
- 64d58a15d8c186b9335bec2bef4b9a3d 14503860 open5gs_2.7.2.4491.deef.202409022026.tar.xz
21
+ 0c764f0215037dbcec58ca54251a9371 14505556 open5gs_2.7.2.4505.4308.202409032026.tar.xz
22
open5gs_2.7.2.4491.deef.202409022026.tar.xz/.tarball-version -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/.tarball-version
Changed
4
1
2
-2.7.2.4491-deef.202409022026
3
+2.7.2.4505-4308.202409032026
4
open5gs_2.7.2.4491.deef.202409022026.tar.xz/configs/meson.build -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/configs/meson.build
Changed
9
1
2
slice.yaml
3
srsenb.yaml
4
non3gpp.yaml
5
+ transfer.yaml
6
'''.split()
7
8
foreach file : example_conf
9
open5gs_2.7.2.4505.4308.202409032026.tar.xz/configs/transfer.yaml.in
Added
201
1
2
+db_uri: mongodb://localhost/open5gs
3
+
4
+logger:
5
+
6
+test:
7
+ serving:
8
+ - plmn_id:
9
+ mcc: 999
10
+ mnc: 70
11
+
12
+global:
13
+ parameter:
14
+# no_nrf: true
15
+# no_scp: true
16
+ no_sepp: true
17
+# no_amf: true
18
+# no_smf: true
19
+# no_upf: true
20
+# no_ausf: true
21
+# no_udm: true
22
+# no_pcf: true
23
+# no_nssf: true
24
+# no_bsf: true
25
+# no_udr: true
26
+ no_mme: true
27
+ no_sgwc: true
28
+ no_sgwu: true
29
+ no_pcrf: true
30
+ no_hss: true
31
+
32
+smf:
33
+ sbi:
34
+ server:
35
+ - address: 127.0.0.4
36
+ port: 7777
37
+ client:
38
+ scp:
39
+ - uri: http://127.0.0.200:7777
40
+ pfcp:
41
+ server:
42
+ - address: 127.0.0.4
43
+ client:
44
+ upf:
45
+ - address: 127.0.0.7
46
+ gtpc:
47
+ server:
48
+ - address: 127.0.0.4
49
+ gtpu:
50
+ server:
51
+ - address: 127.0.0.4
52
+ metrics:
53
+ server:
54
+ - address: 127.0.0.4
55
+ port: 9090
56
+ session:
57
+ - subnet: 10.45.0.0/16
58
+ gateway: 10.45.0.1
59
+ - subnet: 2001:db8:cafe::/48
60
+ gateway: 2001:db8:cafe::1
61
+ dns:
62
+ - 8.8.8.8
63
+ - 8.8.4.4
64
+ - 2001:4860:4860::8888
65
+ - 2001:4860:4860::8844
66
+ mtu: 1400
67
+ freeDiameter:
68
+ identity: smf.localdomain
69
+ realm: localdomain
70
+ listen_on: 127.0.0.4
71
+ no_fwd: true
72
+ load_extension:
73
+ - module: @build_subprojects_freeDiameter_extensions_dir@/dbg_msg_dumps.fdx
74
+ conf: 0x8888
75
+ - module: @build_subprojects_freeDiameter_extensions_dir@/dict_rfc5777.fdx
76
+ - module: @build_subprojects_freeDiameter_extensions_dir@/dict_mip6i.fdx
77
+ - module: @build_subprojects_freeDiameter_extensions_dir@/dict_nasreq.fdx
78
+ - module: @build_subprojects_freeDiameter_extensions_dir@/dict_nas_mipv6.fdx
79
+ - module: @build_subprojects_freeDiameter_extensions_dir@/dict_dcca.fdx
80
+ - module: @build_subprojects_freeDiameter_extensions_dir@/dict_dcca_3gpp/dict_dcca_3gpp.fdx
81
+ connect:
82
+ - identity: pcrf.localdomain
83
+ address: 127.0.0.9
84
+
85
+amf:
86
+ sbi:
87
+ server:
88
+ - address: 127.0.0.5
89
+ port: 7777
90
+ client:
91
+ scp:
92
+ - uri: http://127.0.0.200:7777
93
+ ngap:
94
+ server:
95
+ - address: 127.0.0.5
96
+ metrics:
97
+ server:
98
+ - address: 127.0.0.5
99
+ port: 9090
100
+ guami:
101
+ - plmn_id:
102
+ mcc: 999
103
+ mnc: 70
104
+ amf_id:
105
+ region: 2
106
+ set: 1
107
+ pointer: 31
108
+ tai:
109
+ - plmn_id:
110
+ mcc: 999
111
+ mnc: 70
112
+ tac: 1
113
+ plmn_support:
114
+ - plmn_id:
115
+ mcc: 999
116
+ mnc: 70
117
+ s_nssai:
118
+ - sst: 1
119
+ security:
120
+ integrity_order : NIA2, NIA1, NIA0
121
+ ciphering_order : NEA0, NEA1, NEA2
122
+ network_name:
123
+ full: Open5GS
124
+ amf_name: open5gs-amf0
125
+ time:
126
+ t3512:
127
+ value: 540 # 9 mintues * 60 = 540 seconds
128
+
129
+# amf #2
130
+amf:
131
+ sbi:
132
+ server:
133
+ - address: 127.0.0.50
134
+ port: 7777
135
+ client:
136
+ scp:
137
+ - uri: http://127.0.0.200:7777
138
+ ngap:
139
+ server:
140
+ - address: 127.0.0.50
141
+ metrics:
142
+ server:
143
+ - address: 127.0.0.50
144
+ port: 9090
145
+ guami:
146
+ - plmn_id:
147
+ mcc: 999
148
+ mnc: 70
149
+ amf_id:
150
+ region: 2
151
+ set: 1
152
+ pointer: 30
153
+ tai:
154
+ - plmn_id:
155
+ mcc: 999
156
+ mnc: 70
157
+ tac: 1
158
+ plmn_support:
159
+ - plmn_id:
160
+ mcc: 999
161
+ mnc: 70
162
+ s_nssai:
163
+ - sst: 1
164
+ security:
165
+ integrity_order : NIA2, NIA1, NIA0
166
+ ciphering_order : NEA0, NEA1, NEA2
167
+ network_name:
168
+ full: Open5GS
169
+ amf_name: open5gs-amf1
170
+ time:
171
+ t3512:
172
+ value: 540 # 9 mintues * 60 = 540 seconds
173
+
174
+upf:
175
+ pfcp:
176
+ server:
177
+ - address: 127.0.0.7
178
+ gtpu:
179
+ server:
180
+ - address: 127.0.0.7
181
+ session:
182
+ - subnet: 10.45.0.0/16
183
+ gateway: 10.45.0.1
184
+ - subnet: 2001:db8:cafe::/48
185
+ gateway: 2001:db8:cafe::1
186
+ metrics:
187
+ server:
188
+ - address: 127.0.0.7
189
+ port: 9090
190
+
191
+nrf:
192
+ sbi:
193
+ server:
194
+ - address: 127.0.0.10
195
+ port: 7777
196
+
197
+scp:
198
+ sbi:
199
+ server:
200
+ - address: 127.0.0.200
201
open5gs_2.7.2.4491.deef.202409022026.tar.xz/debian/changelog -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/debian/changelog
Changed
12
1
2
-open5gs (2.7.2.4491.deef.202409022026) unstable; urgency=medium
3
+open5gs (2.7.2.4505.4308.202409032026) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom nightly feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Mon, 02 Sep 2024 20:27:54 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Tue, 03 Sep 2024 20:27:52 +0000
9
10
open5gs (2.7.2) unstable; urgency=medium
11
12
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/app/ogs-config.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/app/ogs-config.c
Changed
50
1
2
return OGS_OK;
3
}
4
5
+int ogs_app_count_nf_conf_sections(const char *conf_section)
6
+{
7
+ if (!strcmp(conf_section, "amf"))
8
+ global_conf.parameter.amf_count++;
9
+ else if (!strcmp(conf_section, "smf"))
10
+ global_conf.parameter.smf_count++;
11
+ else if (!strcmp(conf_section, "upf"))
12
+ global_conf.parameter.upf_count++;
13
+ else if (!strcmp(conf_section, "ausf"))
14
+ global_conf.parameter.ausf_count++;
15
+ else if (!strcmp(conf_section, "udm"))
16
+ global_conf.parameter.udm_count++;
17
+ else if (!strcmp(conf_section, "pcf"))
18
+ global_conf.parameter.pcf_count++;
19
+ else if (!strcmp(conf_section, "nssf"))
20
+ global_conf.parameter.nssf_count++;
21
+ else if (!strcmp(conf_section, "bsf"))
22
+ global_conf.parameter.bsf_count++;
23
+ else if (!strcmp(conf_section, "udr"))
24
+ global_conf.parameter.udr_count++;
25
+
26
+ return OGS_OK;
27
+}
28
+
29
int ogs_app_parse_global_conf(ogs_yaml_iter_t *parent)
30
{
31
int rv;
32
33
int rv;
34
yaml_document_t *document = NULL;
35
ogs_yaml_iter_t root_iter;
36
+ int idx = 0;
37
38
document = ogs_app()->document;
39
ogs_assert(document);
40
41
while (ogs_yaml_iter_next(&root_iter)) {
42
const char *root_key = ogs_yaml_iter_key(&root_iter);
43
ogs_assert(root_key);
44
- if (!strcmp(root_key, local)) {
45
+ if (!strcmp(root_key, local) &&
46
+ (idx++ == ogs_app()->config_section_id)) {
47
ogs_yaml_iter_t local_iter;
48
ogs_yaml_iter_recurse(&root_iter, &local_iter);
49
while (ogs_yaml_iter_next(&local_iter)) {
50
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/app/ogs-config.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/app/ogs-config.h
Changed
26
1
2
int no_scp;
3
int no_nrf;
4
5
+ int amf_count;
6
+ int smf_count;
7
+ int upf_count;
8
+ int ausf_count;
9
+ int udm_count;
10
+ int pcf_count;
11
+ int nssf_count;
12
+ int bsf_count;
13
+ int udr_count;
14
+
15
/* Network */
16
int no_ipv4;
17
int no_ipv6;
18
19
ogs_app_global_conf_t *ogs_global_conf(void);
20
ogs_app_local_conf_t *ogs_local_conf(void);
21
22
+int ogs_app_count_nf_conf_sections(const char *conf_section);
23
int ogs_app_parse_global_conf(ogs_yaml_iter_t *parent);
24
int ogs_app_parse_local_conf(const char *local);
25
26
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/app/ogs-context.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/app/ogs-context.h
Changed
10
1
2
uint64_t max_specs;
3
} metrics;
4
5
+ int config_section_id;
6
+
7
} ogs_app_context_t;
8
9
int ogs_app_context_init(void);
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/app/ogs-init.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/app/ogs-init.c
Changed
66
1
2
char *log_file;
3
char *log_level;
4
char *domain_mask;
5
+ char *config_section_id;
6
} optarg;
7
8
ogs_core_initialize();
9
10
memset(&optarg, 0, sizeof(optarg));
11
12
ogs_getopt_init(&options, (char**)argv);
13
- while ((opt = ogs_getopt(&options, "c:l:e:m:")) != -1) {
14
+ while ((opt = ogs_getopt(&options, "c:l:e:m:k:")) != -1) {
15
switch (opt) {
16
case 'c':
17
optarg.config_file = options.optarg;
18
19
case 'm':
20
optarg.domain_mask = options.optarg;
21
break;
22
+ case 'k':
23
+ optarg.config_section_id = options.optarg;
24
+ break;
25
case '?':
26
default:
27
ogs_assert_if_reached();
28
29
ogs_app()->db_uri = ogs_env_get("DB_URI");
30
31
/**************************************************************************
32
- * Stage 6 : Print Banner
33
+ * Stage 6 : Setup configuration section ID for running multiple NF from
34
+ * same config file
35
+ */
36
+ if (optarg.config_section_id)
37
+ ogs_app()->config_section_id = atoi(optarg.config_section_id);
38
+
39
+ /**************************************************************************
40
+ * Stage 7 : Print Banner
41
*/
42
if (ogs_app()->version) {
43
ogs_log_print(OGS_LOG_INFO,
44
45
}
46
47
/**************************************************************************
48
- * Stage 7 : Queue, Timer and Poll
49
+ * Stage 8 : Queue, Timer and Poll
50
*/
51
ogs_app()->queue = ogs_queue_create(ogs_app()->pool.event);
52
ogs_assert(ogs_app()->queue);
53
54
ogs_error("ogs_global_conf_parse_config() failed");
55
return rv;
56
}
57
+ } else {
58
+ rv = ogs_app_count_nf_conf_sections(root_key);
59
+ if (rv != OGS_OK) {
60
+ ogs_error("ogs_app_count_nf_conf_sections() failed");
61
+ return rv;
62
+ }
63
}
64
}
65
66
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/core/abts.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/core/abts.c
Changed
47
1
2
" -q : turn off status in test\n"
3
" -x : exclute test-unit (e.g. -x sctp-test)\n"
4
" -l : list test-unit\n"
5
+ " -k : use <id> config section\n"
6
"\n", name);
7
}
8
9
10
ogs_getopt_t options;
11
struct {
12
char *config_file;
13
+ char *config_section;
14
char *log_level;
15
char *domain_mask;
16
17
18
memset(&optarg, 0, sizeof(optarg));
19
20
ogs_getopt_init(&options, (char**)argv);
21
- while ((opt = ogs_getopt(&options, "hvxlqc:e:m:dt")) != -1) {
22
+ while ((opt = ogs_getopt(&options, "hvxlqc:e:m:dtk:")) != -1) {
23
switch (opt) {
24
case 'h':
25
show_help(argv0);
26
27
case 't':
28
optarg.enable_trace = true;
29
break;
30
+ case 'k':
31
+ optarg.config_section = options.optarg;
32
+ break;
33
case '?':
34
fprintf(stderr, "%s: %s\n", argv0, options.errmsg);
35
show_help(argv0);
36
37
argv_outi++ = "-m";
38
argv_outi++ = optarg.domain_mask;
39
}
40
+ if (optarg.config_section) {
41
+ argv_outi++ = "-k";
42
+ argv_outi++ = optarg.config_section;
43
+ }
44
45
argv_outi = NULL;
46
47
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/diameter/common/config.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/diameter/common/config.c
Changed
19
1
2
fd_config->conni.addr, errno, strerror(errno));
3
return OGS_ERROR;
4
}
5
-
6
+
7
CHECK_FCT_DO( fd_ep_add_merge(
8
&fddpi.pi_endpoints, ai->ai_addr, ai->ai_addrlen,
9
EP_FL_CONF | (disc ?: EP_ACCEPTALL) ), return OGS_ERROR);
10
11
12
/* Display configuration */
13
b = fd_conf_dump(&buf, &len, NULL);
14
- LOG_SPLIT(FD_LOG_NOTICE, NULL,
15
+ LOG_SPLIT(FD_LOG_NOTICE, NULL,
16
b ?: (char*)"<Error during configuration dump...>", NULL);
17
free(buf);
18
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/diameter/common/init.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/diameter/common/init.c
Changed
64
1
2
if (ret != 0) {
3
ogs_error("fd_log_handler_register() failed");
4
return ret;
5
- }
6
+ }
7
8
ret = fd_core_initialize();
9
if (ret != 0) {
10
ogs_error("fd_core_initialize() failed");
11
return ret;
12
- }
13
-
14
+ }
15
+
16
/* Parse the configuration file */
17
if (conffile) {
18
CHECK_FCT_DO( fd_core_parseconf(conffile), goto error );
19
20
CHECK_FCT( ogs_diam_message_init() );
21
22
/* Initialize FD logger */
23
- CHECK_FCT_DO( ogs_diam_logger_init(mode), goto error );
24
+ CHECK_FCT_DO( ogs_diam_logger_init(), goto error );
25
+
26
+ /* Initialize FD stats */
27
+ CHECK_FCT_DO( ogs_diam_stats_init(mode), goto error );
28
29
return 0;
30
error:
31
32
33
CHECK_FCT_DO( fd_core_waitstartcomplete(), goto error );
34
35
- CHECK_FCT( ogs_diam_logger_stats_start() );
36
+ CHECK_FCT( ogs_diam_stats_start() );
37
38
return 0;
39
error:
40
41
42
void ogs_diam_final()
43
{
44
+ ogs_diam_stats_final();
45
ogs_diam_logger_final();
46
47
CHECK_FCT_DO( fd_core_shutdown(), ogs_error("fd_core_shutdown() failed") );
48
49
ogs_log_printf(level, OGS_LOG_DOMAIN, 0, NULL, 0, NULL, 0, __VA_ARGS__)
50
51
switch(printlevel) {
52
- case FD_LOG_ANNOYING:
53
+ case FD_LOG_ANNOYING:
54
diam_log_printf(OGS_LOG_TRACE, "%d %s\n", printlevel, buffer);
55
- break;
56
+ break;
57
case FD_LOG_DEBUG:
58
diam_log_printf(OGS_LOG_TRACE, "%d %s\n", printlevel, buffer);
59
- break;
60
+ break;
61
case FD_LOG_INFO:
62
diam_log_printf(OGS_LOG_TRACE, "%d %s\n", printlevel, buffer);
63
break;
64
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/diameter/common/logger.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/diameter/common/logger.c
Changed
123
1
2
3
#include "ogs-diameter-common.h"
4
5
-static struct ogs_diam_logger_t self;
6
-
7
static struct fd_hook_hdl *logger_hdl = NULL;
8
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
9
-static pthread_t fd_stats_th = (pthread_t)NULL;
10
11
static ogs_diam_logger_user_handler user_handler = NULL;
12
13
static void ogs_diam_logger_cb(enum fd_hook_type type, struct msg * msg,
14
struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd,
15
void * regdata);
16
-static void * diam_stats_worker(void * arg);
17
18
-int ogs_diam_logger_init(int mode)
19
+int ogs_diam_logger_init()
20
{
21
uint32_t mask_peers = HOOK_MASK( HOOK_PEER_CONNECT_SUCCESS );
22
23
- memset(&self, 0, sizeof(struct ogs_diam_logger_t));
24
-
25
- self.mode = mode;
26
- self.duration = 60; /* 60 seconds */
27
-
28
CHECK_FCT( fd_hook_register(
29
mask_peers, ogs_diam_logger_cb, NULL, NULL, &logger_hdl) );
30
31
- CHECK_POSIX( pthread_mutex_init(&self.stats_lock, NULL) );
32
-
33
return 0;
34
}
35
36
void ogs_diam_logger_final()
37
{
38
- CHECK_FCT_DO( fd_thr_term(&fd_stats_th), );
39
- CHECK_POSIX_DO( pthread_mutex_destroy(&self.stats_lock), );
40
-
41
if (logger_hdl) { CHECK_FCT_DO( fd_hook_unregister( logger_hdl ), ); }
42
}
43
44
-struct ogs_diam_logger_t* ogs_diam_logger_self()
45
-{
46
- return &self;
47
-}
48
-
49
-int ogs_diam_logger_stats_start()
50
-{
51
- /* Start the statistics thread */
52
- CHECK_POSIX( pthread_create(&fd_stats_th, NULL, diam_stats_worker, NULL) );
53
-
54
- return 0;
55
-}
56
-
57
void ogs_diam_logger_register(ogs_diam_logger_user_handler instance)
58
{
59
user_handler = instance;
60
61
CHECK_POSIX_DO( pthread_mutex_unlock(&mtx), );
62
}
63
64
-/* Function to display statistics periodically */
65
-static void * diam_stats_worker(void * arg)
66
-{
67
- struct timespec start, now;
68
- struct fd_stats copy;
69
-
70
- /* Get the start time */
71
- CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &start), );
72
-
73
- /* Now, loop until canceled */
74
- while (1) {
75
- /* Display statistics every XX seconds */
76
- sleep(self.duration);
77
-
78
- /* Now, get the current stats */
79
- CHECK_POSIX_DO( pthread_mutex_lock(&self.stats_lock), );
80
- memcpy(©, &self.stats, sizeof(struct fd_stats));
81
- CHECK_POSIX_DO( pthread_mutex_unlock(&self.stats_lock), );
82
-
83
- /* Get the current execution time */
84
- CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), );
85
-
86
- /* Now, display everything */
87
- ogs_trace("------- fd statistics ---------");
88
- if (now.tv_nsec >= start.tv_nsec)
89
- {
90
- ogs_trace(" Executing for: %d.%06ld sec",
91
- (int)(now.tv_sec - start.tv_sec),
92
- (long)(now.tv_nsec - start.tv_nsec) / 1000);
93
- }
94
- else
95
- {
96
- ogs_trace(" Executing for: %d.%06ld sec",
97
- (int)(now.tv_sec - 1 - start.tv_sec),
98
- (long)(now.tv_nsec + 1000000000 - start.tv_nsec) / 1000);
99
- }
100
-
101
- if (self.mode & FD_MODE_SERVER) {
102
- ogs_trace(" Server: %llu message(s) echoed",
103
- copy.nb_echoed);
104
- }
105
- if (self.mode & FD_MODE_CLIENT) {
106
- ogs_trace(" Client:");
107
- ogs_trace(" %llu message(s) sent", copy.nb_sent);
108
- ogs_trace(" %llu error(s) received", copy.nb_errs);
109
- ogs_trace(" %llu answer(s) received", copy.nb_recv);
110
- ogs_trace(" fastest: %ld.%06ld sec.",
111
- copy.shortest / 1000000, copy.shortest % 1000000);
112
- ogs_trace(" slowest: %ld.%06ld sec.",
113
- copy.longest / 1000000, copy.longest % 1000000);
114
- ogs_trace(" Average: %ld.%06ld sec.",
115
- copy.avg / 1000000, copy.avg % 1000000);
116
- }
117
- ogs_trace("-------------------------------------");
118
- }
119
-
120
- return NULL; /* never called */
121
-}
122
-
123
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/diameter/common/logger.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/diameter/common/logger.h
Changed
36
1
2
extern "C" {
3
#endif
4
5
-struct ogs_diam_logger_t {
6
-
7
-#define FD_MODE_SERVER 0x1
8
-#define FD_MODE_CLIENT 0x2
9
- int mode; /* default FD_MODE_SERVER | FD_MODE_CLIENT */
10
-
11
- int duration; /* default 10 */
12
- struct fd_stats {
13
- unsigned long long nb_echoed; /* server */
14
- unsigned long long nb_sent; /* client */
15
- unsigned long long nb_recv; /* client */
16
- unsigned long long nb_errs; /* client */
17
- unsigned long shortest; /* fastest answer, in microseconds */
18
- unsigned long longest; /* slowest answer, in microseconds */
19
- unsigned long avg; /* average answer time, in microseconds */
20
- } stats;
21
-
22
- pthread_mutex_t stats_lock;
23
-};
24
-
25
-int ogs_diam_logger_init(int mode);
26
+int ogs_diam_logger_init(void);
27
void ogs_diam_logger_final(void);
28
29
-struct ogs_diam_logger_t* ogs_diam_logger_self(void);
30
-
31
-int ogs_diam_logger_stats_start(void);
32
-
33
typedef void (*ogs_diam_logger_user_handler)(
34
enum fd_hook_type type, struct msg *msg, struct peer_hdr *peer,
35
void *other, struct fd_hook_permsgdata *pmd, void *regdata);
36
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/diameter/common/meson.build -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/diameter/common/meson.build
Changed
29
1
2
3
message.h
4
logger.h
5
+ stats.h
6
base.h
7
8
libapp_sip.c
9
dict.c
10
message.c
11
logger.c
12
+ stats.c
13
config.c
14
util.c
15
init.c
16
17
version : libogslib_version,
18
c_args : libdiameter_common_cc_flags,
19
include_directories : libdiameter_common_inc, libinc,
20
- dependencies : libcore_dep, libfdcore_dep,
21
+ dependencies : libcore_dep, libfdcore_dep, libapp_dep,
22
install : true)
23
24
libdiameter_common_dep = declare_dependency(
25
link_with : libdiameter_common,
26
include_directories : libdiameter_common_inc, libinc,
27
- dependencies : libcore_dep, libfdcore_dep)
28
+ dependencies : libcore_dep, libfdcore_dep, libapp_dep)
29
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/diameter/common/ogs-diameter-common.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/diameter/common/ogs-diameter-common.h
Changed
9
1
2
3
#include "diameter/common/message.h"
4
#include "diameter/common/logger.h"
5
+#include "diameter/common/stats.h"
6
#include "diameter/common/base.h"
7
8
#undef OGS_DIAMETER_INSIDE
9
open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/diameter/common/stats.c
Added
125
1
2
+/*
3
+ * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ *
5
+ * This file is part of Open5GS.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Affero General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
20
+
21
+#include "ogs-diameter-common.h"
22
+#include "ogs-app.h"
23
+
24
+static ogs_diam_stats_ctx_t self;
25
+
26
+static void diam_stats_timer_cb(void *data);
27
+
28
+int ogs_diam_stats_init(int mode)
29
+{
30
+ memset(&self, 0, sizeof(ogs_diam_stats_ctx_t));
31
+
32
+ self.mode = mode;
33
+ self.poll.t_interval = ogs_time_from_sec(60); /* 60 seconds */
34
+ self.poll.timer = ogs_timer_add(ogs_app()->timer_mgr,
35
+ diam_stats_timer_cb, 0);
36
+ ogs_assert(self.poll.timer);
37
+
38
+ CHECK_POSIX( pthread_mutex_init(&self.stats_lock, NULL) );
39
+
40
+ return 0;
41
+}
42
+
43
+void ogs_diam_stats_final()
44
+{
45
+ if (self.poll.timer)
46
+ ogs_timer_delete(self.poll.timer);
47
+ self.poll.timer = NULL;
48
+}
49
+
50
+ogs_diam_stats_ctx_t* ogs_diam_stats_self()
51
+{
52
+ return &self;
53
+}
54
+
55
+int ogs_diam_stats_start()
56
+{
57
+ /* Get the start time */
58
+ self.poll.t_start = ogs_get_monotonic_time();
59
+ /* Start the statistics timer */
60
+ self.poll.t_prev = self.poll.t_start;
61
+ ogs_timer_start(self.poll.timer, self.poll.t_interval);
62
+
63
+ return 0;
64
+}
65
+
66
+static void ogs_diam_stats_log(const ogs_diam_stats_t *stats, ogs_time_t elapsed)
67
+{
68
+ ogs_trace("------- fd statistics ---------");
69
+ ogs_trace(" Executing for: %llu.%06llu sec",
70
+ (unsigned long long)ogs_time_sec(elapsed),
71
+ (unsigned long long)ogs_time_usec(elapsed));
72
+
73
+ if (self.mode & FD_MODE_SERVER) {
74
+ ogs_trace(" Server: %llu message(s) echoed",
75
+ stats->nb_echoed);
76
+ }
77
+ if (self.mode & FD_MODE_CLIENT) {
78
+ ogs_trace(" Client:");
79
+ ogs_trace(" %llu message(s) sent", stats->nb_sent);
80
+ ogs_trace(" %llu error(s) received", stats->nb_errs);
81
+ ogs_trace(" %llu answer(s) received", stats->nb_recv);
82
+ ogs_trace(" fastest: %ld.%06ld sec.",
83
+ stats->shortest / 1000000, stats->shortest % 1000000);
84
+ ogs_trace(" slowest: %ld.%06ld sec.",
85
+ stats->longest / 1000000, stats->longest % 1000000);
86
+ ogs_trace(" Average: %ld.%06ld sec.",
87
+ stats->avg / 1000000, stats->avg % 1000000);
88
+ }
89
+ ogs_trace("-------------------------------------");
90
+}
91
+
92
+/* Function to display statistics periodically */
93
+static void diam_stats_timer_cb(void *data)
94
+{
95
+ ogs_time_t now, since_start, since_prev, next_run;
96
+ ogs_diam_stats_t copy;
97
+
98
+ /* Now, get the current stats */
99
+ CHECK_POSIX_DO( pthread_mutex_lock(&self.stats_lock), );
100
+ memcpy(©, &self.stats, sizeof(ogs_diam_stats_t));
101
+ CHECK_POSIX_DO( pthread_mutex_unlock(&self.stats_lock), );
102
+
103
+ /* Get the current execution time */
104
+ now = ogs_get_monotonic_time();
105
+ since_start = now - self.poll.t_start;
106
+
107
+ /* Now, display everything */
108
+ ogs_diam_stats_log(©, since_start);
109
+
110
+ /* Re-schedule timer: */
111
+ since_prev = now - self.poll.t_prev;
112
+ /* Avoid increasing drift: */
113
+ if (since_prev > self.poll.t_interval) {
114
+ if (since_prev - self.poll.t_interval >= self.poll.t_interval)
115
+ next_run = 1; /* 0 not accepted by ogs_timer_start() */
116
+ else
117
+ next_run = self.poll.t_interval - (since_prev - self.poll.t_interval);
118
+ } else {
119
+ next_run = self.poll.t_interval;
120
+ }
121
+ self.poll.t_prev = now;
122
+ ogs_timer_start(self.poll.timer, next_run);
123
+}
124
+
125
open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/diameter/common/stats.h
Added
73
1
2
+/*
3
+ * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ *
5
+ * This file is part of Open5GS.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Affero General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
20
+
21
+#if !defined(OGS_DIAMETER_INSIDE) && !defined(OGS_DIAMETER_COMPILATION)
22
+#error "This header cannot be included directly."
23
+#endif
24
+
25
+#ifndef OGS_DIAM_STATS_H
26
+#define OGS_DIAM_STATS_H
27
+
28
+#ifdef __cplusplus
29
+extern "C" {
30
+#endif
31
+
32
+#include <sys/time.h>
33
+
34
+typedef struct ogs_diam_stats_s {
35
+ unsigned long long nb_echoed; /* server */
36
+ unsigned long long nb_sent; /* client */
37
+ unsigned long long nb_recv; /* client */
38
+ unsigned long long nb_errs; /* client */
39
+ unsigned long shortest; /* fastest answer, in microseconds */
40
+ unsigned long longest; /* slowest answer, in microseconds */
41
+ unsigned long avg; /* average answer time, in microseconds */
42
+} ogs_diam_stats_t;
43
+
44
+typedef struct ogs_diam_stats_ctx_s {
45
+
46
+#define FD_MODE_SERVER 0x1
47
+#define FD_MODE_CLIENT 0x2
48
+ int mode; /* default FD_MODE_SERVER | FD_MODE_CLIENT */
49
+
50
+ struct poll {
51
+ ogs_timer_t *timer;
52
+ ogs_time_t t_start; /* in usecs */
53
+ ogs_time_t t_prev; /* in usecs */
54
+ ogs_time_t t_interval; /* in usecs */
55
+ } poll;
56
+ ogs_diam_stats_t stats;
57
+
58
+ pthread_mutex_t stats_lock;
59
+} ogs_diam_stats_ctx_t;
60
+
61
+int ogs_diam_stats_init(int mode);
62
+void ogs_diam_stats_final(void);
63
+
64
+ogs_diam_stats_ctx_t* ogs_diam_stats_self(void);
65
+
66
+int ogs_diam_stats_start(void);
67
+
68
+#ifdef __cplusplus
69
+}
70
+#endif
71
+
72
+#endif /* OGS_DIAM_STATS_H */
73
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/gtp/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/gtp/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, local)) {
14
+ if ((!strcmp(root_key, local)) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t local_iter;
17
ogs_yaml_iter_recurse(&root_iter, &local_iter);
18
while (ogs_yaml_iter_next(&local_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/metrics/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/metrics/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (local && !strcmp(root_key, local)) {
14
+ if (local && !strcmp(root_key, local) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t local_iter;
17
ogs_yaml_iter_recurse(&root_iter, &local_iter);
18
while (ogs_yaml_iter_next(&local_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/pfcp/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/pfcp/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, local)) {
14
+ if ((!strcmp(root_key, local)) &&
15
+ idx++ == ogs_app()->config_section_id) {
16
ogs_yaml_iter_t local_iter;
17
ogs_yaml_iter_recurse(&root_iter, &local_iter);
18
while (ogs_yaml_iter_next(&local_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/sbi/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/sbi/context.c
Changed
34
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (local && !strcmp(root_key, local)) {
14
+ if (local && !strcmp(root_key, local) &&
15
+ idx++ == ogs_app()->config_section_id) {
16
ogs_yaml_iter_t local_iter;
17
ogs_yaml_iter_recurse(&root_iter, &local_iter);
18
while (ogs_yaml_iter_next(&local_iter)) {
19
20
}
21
}
22
23
+ idx = 0;
24
ogs_yaml_iter_init(&root_iter, document);
25
while (ogs_yaml_iter_next(&root_iter)) {
26
const char *root_key = ogs_yaml_iter_key(&root_iter);
27
ogs_assert(root_key);
28
- if (local && !strcmp(root_key, local)) {
29
+ if (local && !strcmp(root_key, local) &&
30
+ idx++ == ogs_app()->config_section_id) {
31
ogs_yaml_iter_t local_iter;
32
ogs_yaml_iter_recurse(&root_iter, &local_iter);
33
while (ogs_yaml_iter_next(&local_iter)) {
34
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/sbi/message.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/sbi/message.c
Changed
55
1
2
OpenAPI_ue_context_transfer_req_data_free(message->UeContextTransferReqData);
3
if (message->UeContextTransferRspData)
4
OpenAPI_ue_context_transfer_rsp_data_free(message->UeContextTransferRspData);
5
+ if (message->UeRegStatusUpdateReqData)
6
+ OpenAPI_ue_reg_status_update_req_data_free(message->UeRegStatusUpdateReqData);
7
+ if (message->UeRegStatusUpdateRspData)
8
+ OpenAPI_ue_reg_status_update_rsp_data_free(message->UeRegStatusUpdateRspData);
9
10
/* HTTP Part */
11
for (i = 0; i < message->num_of_part; i++) {
12
13
item = OpenAPI_ue_context_transfer_rsp_data_convertToJSON(
14
message->UeContextTransferRspData);
15
ogs_assert(item);
16
+ } else if (message->UeRegStatusUpdateReqData) {
17
+ item = OpenAPI_ue_reg_status_update_req_data_convertToJSON(
18
+ message->UeRegStatusUpdateReqData);
19
+ ogs_assert(item);
20
+ } else if (message->UeRegStatusUpdateRspData) {
21
+ item = OpenAPI_ue_reg_status_update_rsp_data_convertToJSON(
22
+ message->UeRegStatusUpdateRspData);
23
+ ogs_assert(item);
24
}
25
26
if (item) {
27
28
rv = OGS_ERROR;
29
ogs_error("JSON parse error");
30
}
31
+ } else {
32
+ ogs_error("HTTP ERROR Status : %d",
33
+ message->res_status);
34
+ }
35
+ break;
36
+
37
+ CASE(OGS_SBI_RESOURCE_NAME_TRANSFER_UPDATE)
38
+ if (message->res_status == 0) {
39
+ message->UeRegStatusUpdateReqData =
40
+ OpenAPI_ue_reg_status_update_req_data_parseFromJSON(item);
41
+ if (!message->UeRegStatusUpdateReqData) {
42
+ rv = OGS_ERROR;
43
+ ogs_error("JSON parse error");
44
+ }
45
+ } else if (message->res_status == OGS_SBI_HTTP_STATUS_OK) {
46
+ message->UeRegStatusUpdateRspData =
47
+ OpenAPI_ue_reg_status_update_rsp_data_parseFromJSON(item);
48
+ if (!message->UeRegStatusUpdateRspData) {
49
+ rv = OGS_ERROR;
50
+ ogs_error("JSON parse error");
51
+ }
52
} else {
53
ogs_error("HTTP ERROR Status : %d",
54
message->res_status);
55
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/sbi/message.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/sbi/message.h
Changed
18
1
2
#define OGS_SBI_RESOURCE_NAME_UE_CONTEXTS "ue-contexts"
3
#define OGS_SBI_RESOURCE_NAME_N1_N2_MESSAGES "n1-n2-messages"
4
#define OGS_SBI_RESOURCE_NAME_TRANSFER "transfer"
5
+#define OGS_SBI_RESOURCE_NAME_TRANSFER_UPDATE "transfer-update"
6
7
#define OGS_SBI_RESOURCE_NAME_SM_CONTEXT_STATUS "sm-context-status"
8
#define OGS_SBI_RESOURCE_NAME_AM_POLICY_NOTIFY "am-policy-notify"
9
10
OpenAPI_sec_negotiate_rsp_data_t *SecNegotiateRspData;
11
OpenAPI_ue_context_transfer_req_data_t *UeContextTransferReqData;
12
OpenAPI_ue_context_transfer_rsp_data_t *UeContextTransferRspData;
13
+ OpenAPI_ue_reg_status_update_req_data_t *UeRegStatusUpdateReqData;
14
+ OpenAPI_ue_reg_status_update_rsp_data_t *UeRegStatusUpdateRspData;
15
16
ogs_sbi_links_t *links;
17
18
open5gs_2.7.2.4491.deef.202409022026.tar.xz/lib/sbi/ogs-sbi.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/lib/sbi/ogs-sbi.h
Changed
10
1
2
#include "model/ue_authentication_ctx.h"
3
#include "model/ue_context_transfer_req_data.h"
4
#include "model/ue_context_transfer_rsp_data.h"
5
+#include "model/ue_reg_status_update_req_data.h"
6
+#include "model/ue_reg_status_update_rsp_data.h"
7
8
#include "custom/links.h"
9
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/amf/amf-sm.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/amf/amf-sm.c
Changed
25
1
2
END
3
break;
4
5
+ CASE(OGS_SBI_RESOURCE_NAME_TRANSFER_UPDATE)
6
+ SWITCH(sbi_message.h.method)
7
+ CASE(OGS_SBI_HTTP_METHOD_POST)
8
+ amf_namf_comm_handle_registration_status_update_request(
9
+ stream, &sbi_message);
10
+ break;
11
+ DEFAULT
12
+ ogs_error("Invalid HTTP method %s",
13
+ sbi_message.h.method);
14
+ ogs_assert(true ==
15
+ ogs_sbi_server_send_error(stream,
16
+ OGS_SBI_HTTP_STATUS_FORBIDDEN, &sbi_message,
17
+ "Invalid HTTP method", sbi_message.h.method,
18
+ NULL));
19
+ END
20
+ break;
21
+
22
DEFAULT
23
ogs_error("Invalid resource name %s",
24
sbi_message.h.resource.component2);
25
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/amf/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/amf/context.c
Changed
79
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, "amf")) {
14
+ if ((!strcmp(root_key, "amf")) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t amf_iter;
17
ogs_yaml_iter_recurse(&root_iter, &amf_iter);
18
while (ogs_yaml_iter_next(&amf_iter)) {
19
20
* by performing the generic UE configuration update procedure.
21
*/
22
23
- /* Copying from Current to Next Guti */
24
+ /* Copying from Next to Current Guti */
25
amf_ue->current.m_tmsi = amf_ue->next.m_tmsi;
26
memcpy(&amf_ue->current.guti,
27
&amf_ue->next.guti, sizeof(ogs_nas_5gs_guti_t));
28
29
OGS_SBI_NPCF_AM_POLICY_CONTROL_UE_AMBR_AUTHORIZATION);
30
31
amf_ue->rat_restrictions = OpenAPI_list_create();
32
+ amf_ue->to_release_session_list = OpenAPI_list_create();
33
34
ogs_list_init(&amf_ue->sess_list);
35
36
37
AMF_UE_CLEAR_5GSM_MESSAGE(amf_ue);
38
39
OpenAPI_list_free(amf_ue->rat_restrictions);
40
+ OpenAPI_list_free(amf_ue->to_release_session_list);
41
42
/* Remove all session context */
43
amf_sess_remove_all(amf_ue);
44
45
}
46
return false;
47
}
48
+
49
+void amf_ue_save_to_release_session_list(amf_ue_t *amf_ue)
50
+{
51
+ amf_sess_t *sess = NULL;
52
+
53
+ OpenAPI_list_clear(amf_ue->to_release_session_list);
54
+
55
+ ogs_list_for_each(&amf_ue->sess_list, sess) {
56
+ bool supported_s_nssai = false;
57
+ int i;
58
+ for (i = 0; i < amf_self()->num_of_plmn_support; i++) {
59
+ int j;
60
+ for (j = 0; j < amf_self()->plmn_supporti.num_of_s_nssai; j++) {
61
+ if (memcmp(&sess->s_nssai,
62
+ &amf_self()->plmn_supporti.s_nssaij,
63
+ sizeof(ogs_s_nssai_t)) == 0) {
64
+ supported_s_nssai = true;
65
+ break;
66
+ }
67
+ }
68
+ if (supported_s_nssai)
69
+ break;
70
+ }
71
+ if (!supported_s_nssai) {
72
+ double *psi = ogs_calloc(1, sizeof(*psi));
73
+ ogs_assert(psi);
74
+ *psi = (double)sess->psi;
75
+ OpenAPI_list_add(amf_ue->to_release_session_list, psi);
76
+ }
77
+ }
78
+}
79
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/amf/context.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/amf/context.h
Changed
44
1
2
3
typedef uint32_t amf_m_tmsi_t;
4
5
+typedef enum {
6
+ UE_CONTEXT_INITIAL_STATE = 0,
7
+ UE_CONTEXT_TRANSFER_OLD_AMF_STATE,
8
+ UE_CONTEXT_TRANSFER_NEW_AMF_STATE,
9
+ REGISTRATION_STATUS_UPDATE_OLD_AMF_STATE,
10
+ REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE,
11
+} amf_ue_context_transfer_state_t;
12
+
13
typedef struct amf_context_s {
14
/* Served GUAMI */
15
int num_of_served_guami;
16
17
/* UE identity */
18
#define AMF_UE_HAVE_SUCI(__aMF) \
19
((__aMF) && ((__aMF)->suci))
20
+#define AMF_UE_HAVE_SUPI(__aMF) \
21
+ ((__aMF) && ((__aMF)->supi))
22
char *suci; /* TS33.501 : SUCI */
23
char *supi; /* TS33.501 : SUPI */
24
ogs_nas_5gs_mobile_identity_suci_t nas_mobile_identity_suci;
25
26
ogs_nas_5gs_guti_t guti;
27
} current, next;
28
29
+ /* UE context transfer and Registration status update */
30
ogs_nas_5gs_guti_t old_guti;
31
+ amf_ue_context_transfer_state_t amf_ue_context_transfer_state;
32
+ OpenAPI_list_t *to_release_session_list;
33
34
/* UE Info */
35
ogs_guami_t *guami;
36
37
bool amf_update_allowed_nssai(amf_ue_t *amf_ue);
38
bool amf_ue_is_rat_restricted(amf_ue_t *amf_ue);
39
int amf_instance_get_load(void);
40
+void amf_ue_save_to_release_session_list(amf_ue_t *amf_ue);
41
42
#ifdef __cplusplus
43
}
44
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/amf/gmm-sm.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/amf/gmm-sm.c
Changed
201
1
2
r = OGS_ERROR;
3
4
if (sbi_message->res_status == OGS_SBI_HTTP_STATUS_OK) {
5
+ amf_ue->amf_ue_context_transfer_state = UE_CONTEXT_TRANSFER_NEW_AMF_STATE;
6
r = amf_namf_comm_handle_ue_context_transfer_response(
7
sbi_message, amf_ue);
8
if (r != OGS_OK) {
9
ogs_error("failed to handle "
10
"UE_CONTEXT_TRANSFER response");
11
+ amf_ue->amf_ue_context_transfer_state = UE_CONTEXT_INITIAL_STATE;
12
}
13
} else {
14
ogs_error("%s HTTP response error %d",
15
amf_ue->suci, sbi_message->res_status);
16
+ amf_ue->amf_ue_context_transfer_state = UE_CONTEXT_INITIAL_STATE;
17
}
18
19
if (r != OGS_OK) {
20
- if (!AMF_UE_HAVE_SUCI(amf_ue)) {
21
+ if (!(AMF_UE_HAVE_SUCI(amf_ue) ||
22
+ AMF_UE_HAVE_SUPI(amf_ue))) {
23
CLEAR_AMF_UE_TIMER(amf_ue->t3570);
24
r = nas_5gs_send_identity_request(amf_ue);
25
ogs_expect(r == OGS_OK);
26
27
28
if (gmm_registration_request_from_old_amf(amf_ue,
29
&nas_message->gmm.registration_request) == true) {
30
+ /* Send UE context transfer to old AMF */
31
ogs_sbi_discovery_option_t *discovery_option = NULL;
32
ogs_guami_t guami;
33
34
+ amf_ue->amf_ue_context_transfer_state = UE_CONTEXT_INITIAL_STATE;
35
+
36
discovery_option = ogs_sbi_discovery_option_new();
37
ogs_assert(discovery_option);
38
39
40
ran_ue_t *ran_ue = NULL;
41
ogs_nas_5gs_message_t *nas_message = NULL;
42
ogs_nas_security_header_type_t h;
43
+ ogs_sbi_message_t *sbi_message = NULL;
44
45
ogs_assert(s);
46
ogs_assert(e);
47
48
break;
49
}
50
51
+ if (amf_ue->amf_ue_context_transfer_state == UE_CONTEXT_TRANSFER_NEW_AMF_STATE) {
52
+ /*
53
+ * UE context transfer message has been sent
54
+ * to old AMF after Registration request.
55
+ * Now Registrations status update needs to be sent.
56
+ */
57
+ ogs_sbi_discovery_option_t *discovery_option = NULL;
58
+ ogs_guami_t guami;
59
+ int state = e->h.sbi.state;
60
+
61
+ discovery_option = ogs_sbi_discovery_option_new();
62
+ ogs_assert(discovery_option);
63
+
64
+ memcpy(&guami.plmn_id, &amf_ue->home_plmn_id,
65
+ sizeof(ogs_plmn_id_t));
66
+ memcpy(&guami.amf_id, &amf_ue->old_guti.amf_id,
67
+ sizeof(ogs_amf_id_t));
68
+
69
+ ogs_sbi_discovery_option_set_guami(discovery_option, &guami);
70
+
71
+ r = amf_ue_sbi_discover_and_send(
72
+ OGS_SBI_SERVICE_TYPE_NAMF_COMM, discovery_option,
73
+ amf_namf_comm_build_registration_status_update,
74
+ amf_ue, state,
75
+ (void *)OpenAPI_ue_context_transfer_status_TRANSFERRED);
76
+ ogs_expect(r == OGS_OK);
77
+ ogs_assert(r != OGS_ERROR);
78
+
79
+ amf_ue->amf_ue_context_transfer_state = REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE;
80
+ break;
81
+ }
82
+
83
ogs_kdf_kgnb_and_kn3iwf(
84
amf_ue->kamf, amf_ue->ul_count.i32,
85
amf_ue->nas.access_type, amf_ue->kgnb);
86
87
break;
88
}
89
break;
90
+ case OGS_EVENT_SBI_CLIENT:
91
+ sbi_message = e->h.sbi.message;
92
+ ogs_assert(sbi_message);
93
+
94
+ SWITCH(sbi_message->h.service.name)
95
+ CASE(OGS_SBI_SERVICE_NAME_NAMF_COMM)
96
+ SWITCH(sbi_message->h.resource.component0)
97
+ CASE(OGS_SBI_RESOURCE_NAME_UE_CONTEXTS)
98
+ SWITCH(sbi_message->h.resource.component2)
99
+ CASE(OGS_SBI_RESOURCE_NAME_TRANSFER_UPDATE)
100
+ if (amf_ue->amf_ue_context_transfer_state != REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE) {
101
+ ogs_error("UE context transfer state not correct");
102
+ }
103
+ if (sbi_message->res_status != OGS_SBI_HTTP_STATUS_OK) {
104
+ ogs_error("%s HTTP response error %d",
105
+ amf_ue->supi, sbi_message->res_status);
106
+ }
107
+ r = amf_namf_comm_handle_registration_status_update_response(sbi_message, amf_ue);
108
+ ogs_expect(r == OGS_OK);
109
+ ogs_assert(r != OGS_ERROR);
110
+
111
+ amf_ue->amf_ue_context_transfer_state = UE_CONTEXT_INITIAL_STATE;
112
+
113
+ /* Continue with registration */
114
+ ogs_kdf_kgnb_and_kn3iwf(
115
+ amf_ue->kamf, amf_ue->ul_count.i32,
116
+ amf_ue->nas.access_type, amf_ue->kgnb);
117
+ ogs_kdf_nh_gnb(amf_ue->kamf, amf_ue->kgnb, amf_ue->nh);
118
+ amf_ue->nhcc = 1;
119
+
120
+ r = amf_ue_sbi_discover_and_send(
121
+ OGS_SBI_SERVICE_TYPE_NUDM_UECM, NULL,
122
+ amf_nudm_uecm_build_registration, amf_ue, 0, NULL);
123
+ ogs_expect(r == OGS_OK);
124
+ ogs_assert(r != OGS_ERROR);
125
+
126
+ if (amf_ue->nas.message_type == OGS_NAS_5GS_REGISTRATION_REQUEST) {
127
+ OGS_FSM_TRAN(s, &gmm_state_initial_context_setup);
128
+ } else if (amf_ue->nas.message_type ==
129
+ OGS_NAS_5GS_SERVICE_REQUEST) {
130
+ OGS_FSM_TRAN(s, &gmm_state_registered);
131
+ } else {
132
+ ogs_fatal("Invalid OGS_NAS_5GS%d", amf_ue->nas.message_type);
133
+ ogs_assert_if_reached();
134
+ }
135
+ break;
136
+
137
+ DEFAULT
138
+ ogs_error("Invalid resource name %s",
139
+ sbi_message->h.resource.component2);
140
+ ogs_assert_if_reached();
141
+ END
142
+ break;
143
+
144
+ DEFAULT
145
+ ogs_error("Invalid resource name %s",
146
+ sbi_message->h.resource.component0);
147
+ ogs_assert_if_reached();
148
+ END
149
+ break;
150
+
151
+ DEFAULT
152
+ ogs_error("Invalid service name %s", sbi_message->h.service.name);
153
+ ogs_assert_if_reached();
154
+ END
155
+ break;
156
+
157
case AMF_EVENT_5GMM_TIMER:
158
switch (e->h.timer_id) {
159
case AMF_TIMER_T3560:
160
161
ran_ue_t *ran_ue = NULL;
162
ogs_nas_5gs_message_t *nas_message = NULL;
163
ogs_nas_security_header_type_t h;
164
+ ogs_sbi_message_t *sbi_message = NULL;
165
166
ogs_assert(s);
167
ogs_assert(e);
168
169
AMF_UE_CLEAR_5GSM_MESSAGE(amf_ue);
170
CLEAR_AMF_UE_ALL_TIMERS(amf_ue);
171
172
+ if (amf_ue->amf_ue_context_transfer_state == UE_CONTEXT_TRANSFER_NEW_AMF_STATE) {
173
+ /*
174
+ * UE context transfer message has been sent
175
+ * to old AMF after Registration request.
176
+ * Now Registrations status update needs to be sent.
177
+ */
178
+ ogs_sbi_discovery_option_t *discovery_option = NULL;
179
+ ogs_guami_t guami;
180
+ int state = e->h.sbi.state;
181
+
182
+ discovery_option = ogs_sbi_discovery_option_new();
183
+ ogs_assert(discovery_option);
184
+
185
+ memcpy(&guami.plmn_id, &amf_ue->home_plmn_id,
186
+ sizeof(ogs_plmn_id_t));
187
+ memcpy(&guami.amf_id, &amf_ue->old_guti.amf_id,
188
+ sizeof(ogs_amf_id_t));
189
+
190
+ ogs_sbi_discovery_option_set_guami(discovery_option, &guami);
191
+
192
+ r = amf_ue_sbi_discover_and_send(
193
+ OGS_SBI_SERVICE_TYPE_NAMF_COMM, discovery_option,
194
+ amf_namf_comm_build_registration_status_update,
195
+ amf_ue, state,
196
+ (void *)OpenAPI_ue_context_transfer_status_NOT_TRANSFERRED);
197
+ ogs_expect(r == OGS_OK);
198
+ ogs_assert(r != OGS_ERROR);
199
+
200
+ amf_ue->amf_ue_context_transfer_state = REGISTRATION_STATUS_UPDATE_NEW_AMF_STATE;
201
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/amf/namf-build.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/amf/namf-build.c
Changed
71
1
2
3
memset(&plmn_id, 0, sizeof(plmn_id));
4
ogs_nas_to_plmn_id(&plmn_id, &nas_guti->nas_plmn_id);
5
-
6
amf_id = ogs_amf_id_to_string(&nas_guti->amf_id);
7
tmsi = ogs_uint32_to_0string(nas_guti->m_tmsi);
8
9
10
11
request = ogs_sbi_build_request(&message);
12
ogs_expect(request);
13
+
14
+ if (ue_context_id)
15
+ ogs_free(ue_context_id);
16
+
17
+ return request;
18
+}
19
+
20
+ogs_sbi_request_t *amf_namf_comm_build_registration_status_update(
21
+ amf_ue_t *amf_ue, void *data)
22
+{
23
+ ogs_sbi_message_t message;
24
+ ogs_sbi_request_t *request = NULL;
25
+
26
+ OpenAPI_ue_reg_status_update_req_data_t UeRegStatusUpdateReqData;
27
+ char *ue_context_id = NULL;
28
+
29
+ ogs_assert(amf_ue);
30
+ ogs_assert(data);
31
+
32
+ ue_context_id = ogs_guti_to_string(&amf_ue->old_guti);
33
+ ogs_assert(ue_context_id);
34
+
35
+ memset(&message, 0, sizeof(message));
36
+ message.h.method = (char *)OGS_SBI_HTTP_METHOD_POST;
37
+ message.h.service.name = (char *)OGS_SBI_SERVICE_NAME_NAMF_COMM;
38
+ message.h.api.version = (char *)OGS_SBI_API_V1;
39
+ message.h.resource.component0 =
40
+ (char *)OGS_SBI_RESOURCE_NAME_UE_CONTEXTS;
41
+ message.h.resource.component1 = ue_context_id;
42
+ message.h.resource.component2 =
43
+ (char *)OGS_SBI_RESOURCE_NAME_TRANSFER_UPDATE;
44
+ message.UeRegStatusUpdateReqData = &UeRegStatusUpdateReqData;
45
+
46
+ memset(&UeRegStatusUpdateReqData, 0, sizeof(UeRegStatusUpdateReqData));
47
+
48
+ UeRegStatusUpdateReqData.transfer_status =
49
+ (OpenAPI_ue_context_transfer_status_e)data;
50
+ /*
51
+ * TS 29.518
52
+ * 5.2.2.2.2 Registration Status Update
53
+ * If any network slice(s) become no longer available and there are PDU
54
+ * Session(s) associated with them, the target AMF shall include these
55
+ * PDU session(s) in the toReleaseSessionList attribute in the payload.
56
+ */
57
+ if (UeRegStatusUpdateReqData.transfer_status ==
58
+ OpenAPI_ue_context_transfer_status_TRANSFERRED) {
59
+ ogs_assert(amf_ue->to_release_session_list); /* For safety */
60
+ if (amf_ue->to_release_session_list->count) {
61
+ UeRegStatusUpdateReqData.to_release_session_list =
62
+ amf_ue->to_release_session_list;
63
+ }
64
+ }
65
+
66
+ request = ogs_sbi_build_request(&message);
67
+ ogs_expect(request);
68
69
if (ue_context_id)
70
ogs_free(ue_context_id);
71
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/amf/namf-build.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/amf/namf-build.h
Changed
10
1
2
3
ogs_sbi_request_t *amf_namf_comm_build_ue_context_transfer(
4
amf_ue_t *amf_ue, void *data);
5
+ogs_sbi_request_t *amf_namf_comm_build_registration_status_update(
6
+ amf_ue_t *amf_ue, void *data);
7
8
#ifdef __cplusplus
9
}
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/amf/namf-handler.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/amf/namf-handler.c
Changed
201
1
2
ogs_sbi_response_t *response = NULL;
3
ogs_sbi_message_t sendmsg;
4
amf_ue_t *amf_ue = NULL;
5
- ran_ue_t *ran_ue = NULL;
6
7
OpenAPI_ambr_t *UeAmbr = NULL;
8
OpenAPI_list_t *MmContextList = NULL;
9
10
11
ogs_sbi_nf_instance_t *pcf_nf_instance = NULL;
12
13
- char *ue_context_id = NULL;
14
char *encoded_gmm_capability = NULL;
15
int status = OGS_SBI_HTTP_STATUS_OK;
16
char hxkamf_stringOGS_KEYSTRLEN(OGS_SHA256_DIGEST_SIZE);
17
18
memset(&sendmsg, 0, sizeof(sendmsg));
19
sendmsg.UeContextTransferRspData = &UeContextTransferRspData;
20
21
- ue_context_id = recvmsg->h.resource.component1;
22
- if (!ue_context_id) {
23
+ if (!recvmsg->h.resource.component1) {
24
status = OGS_SBI_HTTP_STATUS_BAD_REQUEST;
25
strerror = ogs_msprintf("No UE context ID");
26
goto cleanup;
27
}
28
29
- amf_ue = amf_ue_find_by_ue_context_id(ue_context_id);
30
+ amf_ue = amf_ue_find_by_ue_context_id(recvmsg->h.resource.component1);
31
if (!amf_ue) {
32
status = OGS_SBI_HTTP_STATUS_NOT_FOUND;
33
- strerror = ogs_msprintf("CONTEXT_NOT_FOUND");
34
+ strerror = ogs_msprintf("Cannot find Context ID %s",
35
+ recvmsg->h.resource.component1);
36
goto cleanup;
37
}
38
39
+ if (amf_ue->amf_ue_context_transfer_state != UE_CONTEXT_INITIAL_STATE) {
40
+ ogs_warn("Incorrect UE context transfer state");
41
+ }
42
+
43
if (amf_ue->supi) {
44
UeContext.supi = amf_ue->supi;
45
if (amf_ue->auth_result !=
46
47
if (recvmsg->UeContextTransferReqData->reason ==
48
OpenAPI_transfer_reason_MOBI_REG) {
49
SessionContextList =
50
- amf_namf_comm_encode_ue_session_context_list(amf_ue);
51
+ amf_namf_comm_encode_ue_session_context_list(amf_ue);
52
+ if (SessionContextList->count == 0) {
53
+ OpenAPI_list_free(SessionContextList);
54
+ SessionContextList = NULL;
55
+ }
56
UeContext.session_context_list = SessionContextList;
57
}
58
59
60
ogs_assert(response);
61
ogs_assert(true == ogs_sbi_server_send_response(stream, response));
62
63
+ amf_ue->amf_ue_context_transfer_state = UE_CONTEXT_TRANSFER_OLD_AMF_STATE;
64
+
65
if (encoded_gmm_capability)
66
ogs_free(encoded_gmm_capability);
67
68
69
}
70
71
/*
72
- * Context TRANSFERRED !!!
73
- * So, we removed UE context.
74
+ * Ue context is transfered, but we must keep the UE context until the
75
+ * registartion status update is received.
76
+ *
77
+ * TS 23.502
78
+ * 4.2.2.2.2 General Registration
79
+ *
80
+ * 10. Conditional new AMF to old AMF: Namf_Communication_RegistrationStatusUpdate
81
+ * (PDU Session ID(s) to be released due to slice not supported).
82
+ * If the authentication/security procedure fails, then the Registration shall be
83
+ * rejected and the new AMF invokes the Namf_Communication_RegistrationStatusUpdate
84
+ * service operation with a reject indication towards the old AMF. The old AMF continues
85
+ * as if the UE context transfer service operation was never received.
86
*/
87
- ran_ue = ran_ue_find_by_id(amf_ue->ran_ue_id);
88
- if (ran_ue)
89
- ran_ue_remove(ran_ue);
90
- amf_ue_remove(amf_ue);
91
92
return OGS_OK;
93
94
95
amf_namf_comm_decode_ue_mm_context_list(
96
amf_ue, UeContext->mm_context_list);
97
98
- if (UeContext->session_context_list)
99
+ if (UeContext->session_context_list) {
100
amf_namf_comm_decode_ue_session_context_list(
101
amf_ue, UeContext->session_context_list);
102
-
103
+ /* Save a list of sessions to be released on old AMF */
104
+ if (UeContext->mm_context_list)
105
+ amf_ue_save_to_release_session_list(amf_ue);
106
+ }
107
/* TODO ueRadioCapability */
108
109
return OGS_OK;
110
111
ogs_sbi_header_free(&header);
112
}
113
}
114
+
115
+int amf_namf_comm_handle_registration_status_update_request(
116
+ ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg) {
117
+
118
+ ogs_sbi_response_t *response = NULL;
119
+ ogs_sbi_message_t sendmsg;
120
+ amf_ue_t *amf_ue = NULL;
121
+ ran_ue_t *ran_ue = NULL;
122
+ amf_sess_t *sess = NULL;
123
+
124
+ OpenAPI_ue_reg_status_update_req_data_t *UeRegStatusUpdateReqData =
125
+ recvmsg->UeRegStatusUpdateReqData;
126
+ OpenAPI_ue_reg_status_update_rsp_data_t UeRegStatusUpdateRspData;
127
+
128
+ int status = 0;
129
+ char *strerror = NULL;
130
+
131
+ ogs_assert(stream);
132
+ ogs_assert(recvmsg);
133
+
134
+ if (!recvmsg->h.resource.component1) {
135
+ status = OGS_SBI_HTTP_STATUS_BAD_REQUEST;
136
+ strerror = ogs_msprintf("No UE context ID");
137
+ goto cleanup;
138
+ }
139
+ amf_ue = amf_ue_find_by_ue_context_id(recvmsg->h.resource.component1);
140
+ if (!amf_ue) {
141
+ status = OGS_SBI_HTTP_STATUS_NOT_FOUND;
142
+ strerror = ogs_msprintf("Cannot find Context ID %s",
143
+ recvmsg->h.resource.component1);
144
+ goto cleanup;
145
+ }
146
+
147
+ if (amf_ue->amf_ue_context_transfer_state != UE_CONTEXT_TRANSFER_OLD_AMF_STATE) {
148
+ status = OGS_SBI_HTTP_STATUS_BAD_REQUEST;
149
+ strerror = ogs_msprintf("Incorrect UE context transfer state");
150
+ goto cleanup;
151
+ }
152
+
153
+ memset(&UeRegStatusUpdateRspData, 0, sizeof(UeRegStatusUpdateRspData));
154
+ memset(&sendmsg, 0, sizeof(sendmsg));
155
+ sendmsg.UeRegStatusUpdateRspData = &UeRegStatusUpdateRspData;
156
+
157
+ if (UeRegStatusUpdateReqData->transfer_status ==
158
+ OpenAPI_ue_context_transfer_status_TRANSFERRED) {
159
+ /*
160
+ * TS 29.518
161
+ * 5.2.2.2.2 Registration Status Update
162
+ * Once the update is received, the source AMF shall:
163
+ * - remove the individual ueContext resource and release any PDU session(s) in the
164
+ * toReleaseSessionList attribute, if the transferStatus attribute included in the
165
+ * POST request body is set to "TRANSFERRED" and if the source AMF transferred the
166
+ * complete UE Context including all MM contexts and PDU Session Contexts.
167
+ */
168
+ UeRegStatusUpdateRspData.reg_status_transfer_complete = 1;
169
+
170
+ ran_ue = ran_ue_find_by_id(amf_ue->ran_ue_id);
171
+
172
+ if (ran_ue) {
173
+ if (UeRegStatusUpdateReqData->to_release_session_list) {
174
+ OpenAPI_lnode_t *node = NULL;
175
+ OpenAPI_list_for_each(UeRegStatusUpdateReqData->to_release_session_list, node) {
176
+ /* A double must be read */
177
+ uint8_t psi = *(double *)node->data;
178
+ sess = amf_sess_find_by_psi(amf_ue, psi);
179
+ if (SESSION_CONTEXT_IN_SMF(sess)) {
180
+ amf_sbi_send_release_session(ran_ue, sess, AMF_RELEASE_SM_CONTEXT_NO_STATE);
181
+ } else {
182
+ ogs_error("%s No Session Context PSI%d",
183
+ amf_ue->supi, psi);
184
+ UeRegStatusUpdateRspData.reg_status_transfer_complete = 0;
185
+ }
186
+ }
187
+ }
188
+ }
189
+
190
+ /* Clear UE context */
191
+ CLEAR_NG_CONTEXT(amf_ue);
192
+ AMF_UE_CLEAR_PAGING_INFO(amf_ue);
193
+ AMF_UE_CLEAR_N2_TRANSFER(amf_ue, pdu_session_resource_setup_request);
194
+ AMF_UE_CLEAR_5GSM_MESSAGE(amf_ue);
195
+ CLEAR_AMF_UE_ALL_TIMERS(amf_ue);
196
+ OGS_ASN_CLEAR_DATA(&amf_ue->ueRadioCapability);
197
+
198
+ } else if (UeRegStatusUpdateReqData->transfer_status ==
199
+ OpenAPI_ue_context_transfer_status_NOT_TRANSFERRED) {
200
+ /*
201
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/amf/namf-handler.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/amf/namf-handler.h
Changed
12
1
2
ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg);
3
int amf_namf_comm_handle_ue_context_transfer_response(
4
ogs_sbi_message_t *recvmsg, amf_ue_t *amf_ue);
5
+int amf_namf_comm_handle_registration_status_update_request(
6
+ ogs_sbi_stream_t *stream, ogs_sbi_message_t *recvmsg);
7
+int amf_namf_comm_handle_registration_status_update_response(
8
+ ogs_sbi_message_t *recvmsg, amf_ue_t *amf_ue);
9
10
#ifdef __cplusplus
11
}
12
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/ausf/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/ausf/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, "ausf")) {
14
+ if ((!strcmp(root_key, "ausf")) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t ausf_iter;
17
ogs_yaml_iter_recurse(&root_iter, &ausf_iter);
18
while (ogs_yaml_iter_next(&ausf_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/bsf/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/bsf/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, "bsf")) {
14
+ if ((!strcmp(root_key, "bsf")) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t bsf_iter;
17
ogs_yaml_iter_recurse(&root_iter, &bsf_iter);
18
while (ogs_yaml_iter_next(&bsf_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/hss/hss-cx-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/hss/hss-cx-path.c
Changed
105
1
2
3
ogs_assert(msg);
4
5
- ogs_debug("User-Authorization-Request");
6
+ ogs_debug("Rx User-Authorization-Request");
7
8
/* Create answer header */
9
qry = *msg;
10
11
ret = fd_msg_send(msg, NULL, NULL);
12
ogs_assert(ret == 0);
13
14
- ogs_debug("User-Authorization-Answer");
15
+ ogs_debug("Tx User-Authorization-Answer");
16
17
/* Add this value to the stats */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
- ogs_diam_logger_self()->stats.nb_echoed++;
20
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
21
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
22
+ ogs_diam_stats_self()->stats.nb_echoed++;
23
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
24
25
ogs_free(user_name);
26
ogs_free(public_identity);
27
28
29
ogs_assert(msg);
30
31
- ogs_debug("Multimedia-Auth-Request");
32
+ ogs_debug("Rx Multimedia-Auth-Request");
33
34
/* Create answer header */
35
qry = *msg;
36
37
ret = fd_msg_send(msg, NULL, NULL);
38
ogs_assert(ret == 0);
39
40
- ogs_debug("Multimedia-Auth-Answer");
41
+ ogs_debug("Tx Multimedia-Auth-Answer");
42
43
/* Add this value to the stats */
44
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
45
- ogs_diam_logger_self()->stats.nb_echoed++;
46
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
47
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
48
+ ogs_diam_stats_self()->stats.nb_echoed++;
49
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
50
51
if (authentication_scheme)
52
ogs_free(authentication_scheme);
53
54
55
ogs_assert(msg);
56
57
- ogs_debug("Server-Assignment-Request");
58
+ ogs_debug("Rx Server-Assignment-Request");
59
60
/* Create answer header */
61
qry = *msg;
62
63
ret = fd_msg_send(msg, NULL, NULL);
64
ogs_assert(ret == 0);
65
66
- ogs_debug("Server-Assignment-Answer");
67
+ ogs_debug("Tx Server-Assignment-Answer");
68
69
/* Add this value to the stats */
70
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
71
- ogs_diam_logger_self()->stats.nb_echoed++;
72
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
73
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
74
+ ogs_diam_stats_self()->stats.nb_echoed++;
75
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
76
77
if (user_data)
78
ogs_free(user_data);
79
80
81
ogs_assert(msg);
82
83
- ogs_debug("Location-Info-Request");
84
+ ogs_debug("Rx Location-Info-Request");
85
86
/* Create answer header */
87
qry = *msg;
88
89
ret = fd_msg_send(msg, NULL, NULL);
90
ogs_assert(ret == 0);
91
92
- ogs_debug("Location-Info-Answer");
93
+ ogs_debug("Tx Location-Info-Answer");
94
95
/* Add this value to the stats */
96
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
97
- ogs_diam_logger_self()->stats.nb_echoed++;
98
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
99
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
100
+ ogs_diam_stats_self()->stats.nb_echoed++;
101
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
102
103
ogs_free(public_identity);
104
105
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/hss/hss-s6a-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/hss/hss-s6a-path.c
Changed
141
1
2
3
ogs_assert(msg);
4
5
- ogs_debug("Authentication-Information-Request");
6
+ ogs_debug("Rx Authentication-Information-Request");
7
8
/* Create answer header */
9
qry = *msg;
10
11
ret = fd_msg_send(msg, NULL, NULL);
12
ogs_assert(ret == 0);
13
14
- ogs_debug("Authentication-Information-Answer");
15
+ ogs_debug("Tx Authentication-Information-Answer");
16
17
/* Add this value to the stats */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
- ogs_diam_logger_self()->stats.nb_echoed++;
20
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
21
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
22
+ ogs_diam_stats_self()->stats.nb_echoed++;
23
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
24
25
return 0;
26
27
28
29
ogs_assert(msg);
30
31
- ogs_debug("Update-Location-Request");
32
+ ogs_debug("Rx Update-Location-Request");
33
34
memset(&subscription_data, 0, sizeof(ogs_subscription_data_t));
35
36
37
ret = fd_msg_send(msg, NULL, NULL);
38
ogs_assert(ret == 0);
39
40
- ogs_debug("Update-Location-Answer");
41
+ ogs_debug("Tx Update-Location-Answer");
42
43
/* Add this value to the stats */
44
- ogs_assert( pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
45
- ogs_diam_logger_self()->stats.nb_echoed++;
46
- ogs_assert( pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
47
+ ogs_assert( pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
48
+ ogs_diam_stats_self()->stats.nb_echoed++;
49
+ ogs_assert( pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
50
51
ogs_subscription_data_free(&subscription_data);
52
53
54
55
ogs_assert(msg);
56
57
- ogs_debug("Purge-UE-Request");
58
+ ogs_debug("Rx Purge-UE-Request");
59
60
memset(&subscription_data, 0, sizeof(ogs_subscription_data_t));
61
62
63
ret = fd_msg_send(msg, NULL, NULL);
64
ogs_assert(ret == 0);
65
66
- ogs_debug("Purge-UE-Answer");
67
+ ogs_debug("Tx Purge-UE-Answer");
68
69
/* Add this value to the stats */
70
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
71
- ogs_diam_logger_self()->stats.nb_echoed++;
72
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
73
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
74
+ ogs_diam_stats_self()->stats.nb_echoed++;
75
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
76
77
ogs_subscription_data_free(&subscription_data);
78
79
80
struct sess_state *sess_data = NULL, *svg;
81
struct session *session = NULL;
82
83
- ogs_debug("HSS Cancel-Location-Request");
84
+ ogs_debug("HSS Tx Cancel-Location-Request");
85
86
/* Create the random value to store with the session */
87
sess_data = ogs_calloc(1, sizeof(*sess_data));
88
89
ogs_assert(ret == 0);
90
91
/* Increment the counter */
92
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
93
- ogs_diam_logger_self()->stats.nb_sent++;
94
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
95
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
96
+ ogs_diam_stats_self()->stats.nb_sent++;
97
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
98
99
}
100
101
102
struct session *session;
103
int new;
104
105
- ogs_debug("HSS Cancel-Location-Answer");
106
+ ogs_debug("HSS Rx Cancel-Location-Answer");
107
108
/* Search the session, retrieve its data */
109
ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new);
110
111
112
ogs_subscription_data_t subscription_data;
113
114
- ogs_debug("HSS Insert-Subscriber-Data-Request");
115
+ ogs_debug("HSS Tx Insert-Subscriber-Data-Request");
116
117
memset(&subscription_data, 0, sizeof(ogs_subscription_data_t));
118
119
120
ogs_assert(ret == 0);
121
122
/* Increment the counter */
123
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
124
- ogs_diam_logger_self()->stats.nb_sent++;
125
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
126
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
127
+ ogs_diam_stats_self()->stats.nb_sent++;
128
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
129
130
ogs_subscription_data_free(&subscription_data);
131
132
133
struct session *session;
134
int new;
135
136
- ogs_debug("HSS Insert-Subscriber-Data-Answer");
137
+ ogs_debug("HSS Rx Insert-Subscriber-Data-Answer");
138
139
/* Search the session, retrieve its data */
140
ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new);
141
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/hss/hss-swx-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/hss/hss-swx-path.c
Changed
27
1
2
ogs_debug("Multimedia-Auth-Answer");
3
4
/* Add this value to the stats */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_echoed++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_echoed++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
11
12
if (authentication_scheme)
13
ogs_free(authentication_scheme);
14
15
ogs_debug("Server-Assignment-Answer");
16
17
/* Add this value to the stats */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
- ogs_diam_logger_self()->stats.nb_echoed++;
20
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
21
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
22
+ ogs_diam_stats_self()->stats.nb_echoed++;
23
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
24
25
ogs_subscription_data_free(&subscription_data);
26
ogs_free(user_name);
27
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/main.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/main.c
Changed
47
1
2
" -D : start as a daemon\n"
3
" -v : show version number and exit\n"
4
" -h : show this message and exit\n"
5
+ " -k : use <id> config section\n"
6
"\n", name);
7
}
8
9
10
ogs_getopt_t options;
11
struct {
12
char *config_file;
13
+ char *config_section;
14
char *log_file;
15
char *log_level;
16
char *domain_mask;
17
18
memset(&optarg, 0, sizeof(optarg));
19
20
ogs_getopt_init(&options, (char**)argv);
21
- while ((opt = ogs_getopt(&options, "vhDc:l:e:m:dt")) != -1) {
22
+ while ((opt = ogs_getopt(&options, "vhDc:l:e:m:dtk:")) != -1) {
23
switch (opt) {
24
case 'v':
25
show_version();
26
27
case 't':
28
optarg.enable_trace = true;
29
break;
30
+ case 'k':
31
+ optarg.config_section = options.optarg;
32
+ break;
33
case '?':
34
fprintf(stderr, "%s: %s\n", argv0, options.errmsg);
35
show_help(argv0);
36
37
argv_outi++ = "-m";
38
argv_outi++ = optarg.domain_mask;
39
}
40
+ if (optarg.config_section) {
41
+ argv_outi++ = "-k";
42
+ argv_outi++ = optarg.config_section;
43
+ }
44
45
argv_outi = NULL;
46
47
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/mme/mme-context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/mme/mme-context.c
Changed
17
1
2
mme_csmap_remove_all();
3
mme_vlr_remove_all();
4
mme_sgsn_remove_all();
5
+ mme_hssmap_remove_all();
6
7
ogs_assert(self.enb_addr_hash);
8
ogs_hash_destroy(self.enb_addr_hash);
9
10
ogs_pool_final(&mme_pgw_pool);
11
ogs_pool_final(&mme_csmap_pool);
12
ogs_pool_final(&mme_vlr_pool);
13
+ ogs_pool_final(&mme_hssmap_pool);
14
15
context_initialized = 0;
16
}
17
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/mme/mme-fd-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/mme/mme-fd-path.c
Changed
201
1
2
ogs_assert(ret == 0);
3
4
/* Increment the counter */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_sent++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_sent++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
11
}
12
13
void mme_s6a_send_air(enb_ue_t *enb_ue, mme_ue_t *mme_ue,
14
15
}
16
17
/* Free the message */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
20
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
21
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
22
- if (ogs_diam_logger_self()->stats.nb_recv) {
23
+ if (ogs_diam_stats_self()->stats.nb_recv) {
24
/* Ponderate in the avg */
25
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
26
- ogs_diam_logger_self()->stats.nb_recv + dur) /
27
- (ogs_diam_logger_self()->stats.nb_recv + 1);
28
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
29
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
30
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
31
/* Min, max */
32
- if (dur < ogs_diam_logger_self()->stats.shortest)
33
- ogs_diam_logger_self()->stats.shortest = dur;
34
- if (dur > ogs_diam_logger_self()->stats.longest)
35
- ogs_diam_logger_self()->stats.longest = dur;
36
- } else {
37
- ogs_diam_logger_self()->stats.shortest = dur;
38
- ogs_diam_logger_self()->stats.longest = dur;
39
- ogs_diam_logger_self()->stats.avg = dur;
40
+ if (dur < ogs_diam_stats_self()->stats.shortest)
41
+ ogs_diam_stats_self()->stats.shortest = dur;
42
+ if (dur > ogs_diam_stats_self()->stats.longest)
43
+ ogs_diam_stats_self()->stats.longest = dur;
44
+ } else {
45
+ ogs_diam_stats_self()->stats.shortest = dur;
46
+ ogs_diam_stats_self()->stats.longest = dur;
47
+ ogs_diam_stats_self()->stats.avg = dur;
48
}
49
if (error)
50
- ogs_diam_logger_self()->stats.nb_errs++;
51
+ ogs_diam_stats_self()->stats.nb_errs++;
52
else
53
- ogs_diam_logger_self()->stats.nb_recv++;
54
+ ogs_diam_stats_self()->stats.nb_recv++;
55
56
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
57
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
58
59
/* Display how long it took */
60
if (ts.tv_nsec > sess_data->ts.tv_nsec)
61
62
ogs_assert(ret == 0);
63
64
/* Increment the counter */
65
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
66
- ogs_diam_logger_self()->stats.nb_sent++;
67
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
68
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
69
+ ogs_diam_stats_self()->stats.nb_sent++;
70
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
71
}
72
73
/* MME received Update Location Answer from HSS */
74
75
}
76
77
/* Free the message */
78
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
79
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
80
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
81
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
82
- if (ogs_diam_logger_self()->stats.nb_recv) {
83
+ if (ogs_diam_stats_self()->stats.nb_recv) {
84
/* Ponderate in the avg */
85
- ogs_diam_logger_self()->stats.avg =
86
- (ogs_diam_logger_self()->stats.avg *
87
- ogs_diam_logger_self()->stats.nb_recv + dur) /
88
- (ogs_diam_logger_self()->stats.nb_recv + 1);
89
+ ogs_diam_stats_self()->stats.avg =
90
+ (ogs_diam_stats_self()->stats.avg *
91
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
92
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
93
/* Min, max */
94
- if (dur < ogs_diam_logger_self()->stats.shortest)
95
- ogs_diam_logger_self()->stats.shortest = dur;
96
- if (dur > ogs_diam_logger_self()->stats.longest)
97
- ogs_diam_logger_self()->stats.longest = dur;
98
- } else {
99
- ogs_diam_logger_self()->stats.shortest = dur;
100
- ogs_diam_logger_self()->stats.longest = dur;
101
- ogs_diam_logger_self()->stats.avg = dur;
102
+ if (dur < ogs_diam_stats_self()->stats.shortest)
103
+ ogs_diam_stats_self()->stats.shortest = dur;
104
+ if (dur > ogs_diam_stats_self()->stats.longest)
105
+ ogs_diam_stats_self()->stats.longest = dur;
106
+ } else {
107
+ ogs_diam_stats_self()->stats.shortest = dur;
108
+ ogs_diam_stats_self()->stats.longest = dur;
109
+ ogs_diam_stats_self()->stats.avg = dur;
110
}
111
if (error)
112
- ogs_diam_logger_self()->stats.nb_errs++;
113
+ ogs_diam_stats_self()->stats.nb_errs++;
114
else
115
- ogs_diam_logger_self()->stats.nb_recv++;
116
+ ogs_diam_stats_self()->stats.nb_recv++;
117
118
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
119
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
120
121
/* Display how long it took */
122
if (ts.tv_nsec > sess_data->ts.tv_nsec)
123
124
ogs_assert(ret == 0);
125
126
/* Increment the counter */
127
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
128
- ogs_diam_logger_self()->stats.nb_sent++;
129
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
130
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
131
+ ogs_diam_stats_self()->stats.nb_sent++;
132
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
133
}
134
135
/* MME received Purge UE Answer from HSS */
136
137
}
138
139
/* Free the message */
140
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
141
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
142
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
143
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
144
- if (ogs_diam_logger_self()->stats.nb_recv) {
145
+ if (ogs_diam_stats_self()->stats.nb_recv) {
146
/* Ponderate in the avg */
147
- ogs_diam_logger_self()->stats.avg =
148
- (ogs_diam_logger_self()->stats.avg *
149
- ogs_diam_logger_self()->stats.nb_recv + dur) /
150
- (ogs_diam_logger_self()->stats.nb_recv + 1);
151
+ ogs_diam_stats_self()->stats.avg =
152
+ (ogs_diam_stats_self()->stats.avg *
153
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
154
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
155
/* Min, max */
156
- if (dur < ogs_diam_logger_self()->stats.shortest)
157
- ogs_diam_logger_self()->stats.shortest = dur;
158
- if (dur > ogs_diam_logger_self()->stats.longest)
159
- ogs_diam_logger_self()->stats.longest = dur;
160
- } else {
161
- ogs_diam_logger_self()->stats.shortest = dur;
162
- ogs_diam_logger_self()->stats.longest = dur;
163
- ogs_diam_logger_self()->stats.avg = dur;
164
+ if (dur < ogs_diam_stats_self()->stats.shortest)
165
+ ogs_diam_stats_self()->stats.shortest = dur;
166
+ if (dur > ogs_diam_stats_self()->stats.longest)
167
+ ogs_diam_stats_self()->stats.longest = dur;
168
+ } else {
169
+ ogs_diam_stats_self()->stats.shortest = dur;
170
+ ogs_diam_stats_self()->stats.longest = dur;
171
+ ogs_diam_stats_self()->stats.avg = dur;
172
}
173
if (error)
174
- ogs_diam_logger_self()->stats.nb_errs++;
175
+ ogs_diam_stats_self()->stats.nb_errs++;
176
else
177
- ogs_diam_logger_self()->stats.nb_recv++;
178
+ ogs_diam_stats_self()->stats.nb_recv++;
179
180
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
181
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
182
183
/* Display how long it took */
184
if (ts.tv_nsec > sess_data->ts.tv_nsec)
185
186
ogs_debug("Cancel-Location-Answer");
187
188
/* Add this value to the stats */
189
- ogs_assert( pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
190
- ogs_diam_logger_self()->stats.nb_echoed++;
191
- ogs_assert( pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
192
+ ogs_assert( pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
193
+ ogs_diam_stats_self()->stats.nb_echoed++;
194
+ ogs_assert( pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
195
196
e = mme_event_new(MME_EVENT_S6A_MESSAGE);
197
ogs_assert(e);
198
199
ogs_debug("Insert-Subscriber-Data-Answer");
200
201
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/nssf/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/nssf/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, "nssf")) {
14
+ if ((!strcmp(root_key, "nssf")) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t nssf_iter;
17
ogs_yaml_iter_recurse(&root_iter, &nssf_iter);
18
while (ogs_yaml_iter_next(&nssf_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/pcf/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/pcf/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, "pcf")) {
14
+ if ((!strcmp(root_key, "pcf")) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t pcf_iter;
17
ogs_yaml_iter_recurse(&root_iter, &pcf_iter);
18
while (ogs_yaml_iter_next(&pcf_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/pcrf/pcrf-gx-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/pcrf/pcrf-gx-path.c
Changed
73
1
2
ogs_debug("Credit-Control-Answer");
3
4
/* Add this value to the stats */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_echoed++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) ==0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_echoed++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) ==0);
11
12
OGS_SESSION_DATA_FREE(&gx_message.session_data);
13
14
15
ogs_assert(ret == 0);
16
17
/* Increment the counter */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
- ogs_diam_logger_self()->stats.nb_sent++;
20
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
21
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
22
+ ogs_diam_stats_self()->stats.nb_sent++;
23
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
24
25
/* Set no error */
26
rx_message->result_code = ER_DIAMETER_SUCCESS;
27
28
}
29
30
/* Free the message */
31
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
32
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
33
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
34
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
35
- if (ogs_diam_logger_self()->stats.nb_recv) {
36
+ if (ogs_diam_stats_self()->stats.nb_recv) {
37
/* Ponderate in the avg */
38
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
39
- ogs_diam_logger_self()->stats.nb_recv + dur) /
40
- (ogs_diam_logger_self()->stats.nb_recv + 1);
41
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
42
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
43
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
44
/* Min, max */
45
- if (dur < ogs_diam_logger_self()->stats.shortest)
46
- ogs_diam_logger_self()->stats.shortest = dur;
47
- if (dur > ogs_diam_logger_self()->stats.longest)
48
- ogs_diam_logger_self()->stats.longest = dur;
49
+ if (dur < ogs_diam_stats_self()->stats.shortest)
50
+ ogs_diam_stats_self()->stats.shortest = dur;
51
+ if (dur > ogs_diam_stats_self()->stats.longest)
52
+ ogs_diam_stats_self()->stats.longest = dur;
53
} else {
54
- ogs_diam_logger_self()->stats.shortest = dur;
55
- ogs_diam_logger_self()->stats.longest = dur;
56
- ogs_diam_logger_self()->stats.avg = dur;
57
+ ogs_diam_stats_self()->stats.shortest = dur;
58
+ ogs_diam_stats_self()->stats.longest = dur;
59
+ ogs_diam_stats_self()->stats.avg = dur;
60
}
61
if (error)
62
- ogs_diam_logger_self()->stats.nb_errs++;
63
+ ogs_diam_stats_self()->stats.nb_errs++;
64
else
65
- ogs_diam_logger_self()->stats.nb_recv++;
66
+ ogs_diam_stats_self()->stats.nb_recv++;
67
68
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
69
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
70
71
/* Display how long it took */
72
if (ts.tv_nsec > sess_data->ts.tv_nsec)
73
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/pcrf/pcrf-rx-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/pcrf/pcrf-rx-path.c
Changed
40
1
2
ogs_debug("PCRF AA-Answer");
3
4
/* Add this value to the stats */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_echoed++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_echoed++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
11
12
ogs_ims_data_free(&rx_message.ims_data);
13
14
15
ogs_assert(ret == 0);
16
17
/* Increment the counter */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
- ogs_diam_logger_self()->stats.nb_sent++;
20
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
21
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
22
+ ogs_diam_stats_self()->stats.nb_sent++;
23
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
24
25
return OGS_OK;
26
}
27
28
ogs_debug("PCRF Session-Termination-Answer");
29
30
/* Add this value to the stats */
31
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
32
- ogs_diam_logger_self()->stats.nb_echoed++;
33
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
34
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
35
+ ogs_diam_stats_self()->stats.nb_echoed++;
36
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
37
38
state_cleanup(sess_data, NULL, NULL);
39
ogs_ims_data_free(&rx_message.ims_data);
40
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/smf/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/smf/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, "smf")) {
14
+ if ((!strcmp(root_key, "smf")) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t smf_iter;
17
ogs_yaml_iter_recurse(&root_iter, &smf_iter);
18
while (ogs_yaml_iter_next(&smf_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/smf/gx-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/smf/gx-path.c
Changed
73
1
2
ogs_assert(ret == 0);
3
4
/* Increment the counter */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_sent++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_sent++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
11
}
12
13
/* 3GPP TS 29.212 5b.6.5 Credit-Control-Answer */
14
15
}
16
17
/* Free the message */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
20
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
21
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
22
- if (ogs_diam_logger_self()->stats.nb_recv) {
23
+ if (ogs_diam_stats_self()->stats.nb_recv) {
24
/* Ponderate in the avg */
25
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
26
- ogs_diam_logger_self()->stats.nb_recv + dur) /
27
- (ogs_diam_logger_self()->stats.nb_recv + 1);
28
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
29
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
30
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
31
/* Min, max */
32
- if (dur < ogs_diam_logger_self()->stats.shortest)
33
- ogs_diam_logger_self()->stats.shortest = dur;
34
- if (dur > ogs_diam_logger_self()->stats.longest)
35
- ogs_diam_logger_self()->stats.longest = dur;
36
+ if (dur < ogs_diam_stats_self()->stats.shortest)
37
+ ogs_diam_stats_self()->stats.shortest = dur;
38
+ if (dur > ogs_diam_stats_self()->stats.longest)
39
+ ogs_diam_stats_self()->stats.longest = dur;
40
} else {
41
- ogs_diam_logger_self()->stats.shortest = dur;
42
- ogs_diam_logger_self()->stats.longest = dur;
43
- ogs_diam_logger_self()->stats.avg = dur;
44
+ ogs_diam_stats_self()->stats.shortest = dur;
45
+ ogs_diam_stats_self()->stats.longest = dur;
46
+ ogs_diam_stats_self()->stats.avg = dur;
47
}
48
if (error)
49
- ogs_diam_logger_self()->stats.nb_errs++;
50
+ ogs_diam_stats_self()->stats.nb_errs++;
51
else
52
- ogs_diam_logger_self()->stats.nb_recv++;
53
+ ogs_diam_stats_self()->stats.nb_recv++;
54
55
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
56
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
57
58
/* Display how long it took */
59
if (ts.tv_nsec > sess_data->ts.tv_nsec)
60
61
ogs_debug("Re-Auth-Answer");
62
63
/* Add this value to the stats */
64
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
65
- ogs_diam_logger_self()->stats.nb_echoed++;
66
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
67
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
68
+ ogs_diam_stats_self()->stats.nb_echoed++;
69
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
70
71
return 0;
72
73
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/smf/gy-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/smf/gy-path.c
Changed
73
1
2
3
4
/* Increment the counter */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_sent++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_sent++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
11
}
12
13
static void smf_gy_cca_cb(void *data, struct msg **msg)
14
15
}
16
17
/* Free the message */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
20
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
21
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
22
- if (ogs_diam_logger_self()->stats.nb_recv) {
23
+ if (ogs_diam_stats_self()->stats.nb_recv) {
24
/* Ponderate in the avg */
25
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
26
- ogs_diam_logger_self()->stats.nb_recv + dur) /
27
- (ogs_diam_logger_self()->stats.nb_recv + 1);
28
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
29
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
30
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
31
/* Min, max */
32
- if (dur < ogs_diam_logger_self()->stats.shortest)
33
- ogs_diam_logger_self()->stats.shortest = dur;
34
- if (dur > ogs_diam_logger_self()->stats.longest)
35
- ogs_diam_logger_self()->stats.longest = dur;
36
+ if (dur < ogs_diam_stats_self()->stats.shortest)
37
+ ogs_diam_stats_self()->stats.shortest = dur;
38
+ if (dur > ogs_diam_stats_self()->stats.longest)
39
+ ogs_diam_stats_self()->stats.longest = dur;
40
} else {
41
- ogs_diam_logger_self()->stats.shortest = dur;
42
- ogs_diam_logger_self()->stats.longest = dur;
43
- ogs_diam_logger_self()->stats.avg = dur;
44
+ ogs_diam_stats_self()->stats.shortest = dur;
45
+ ogs_diam_stats_self()->stats.longest = dur;
46
+ ogs_diam_stats_self()->stats.avg = dur;
47
}
48
if (error)
49
- ogs_diam_logger_self()->stats.nb_errs++;
50
+ ogs_diam_stats_self()->stats.nb_errs++;
51
else
52
- ogs_diam_logger_self()->stats.nb_recv++;
53
+ ogs_diam_stats_self()->stats.nb_recv++;
54
55
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
56
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
57
58
/* Display how long it took */
59
if (ts.tv_nsec > sess_data->ts.tv_nsec)
60
61
ogs_debug("Re-Auth-Answer");
62
63
/* Add this value to the stats */
64
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
65
- ogs_diam_logger_self()->stats.nb_echoed++;
66
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
67
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
68
+ ogs_diam_stats_self()->stats.nb_echoed++;
69
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
70
71
return 0;
72
73
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/smf/s6b-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/smf/s6b-path.c
Changed
119
1
2
ogs_assert(ret == 0);
3
4
/* Increment the counter */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_sent++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_sent++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
11
12
ogs_free(user_name);
13
ogs_free(visited_network_identifier);
14
15
}
16
17
/* Free the message */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
20
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
21
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
22
- if (ogs_diam_logger_self()->stats.nb_recv) {
23
+ if (ogs_diam_stats_self()->stats.nb_recv) {
24
/* Ponderate in the avg */
25
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
26
- ogs_diam_logger_self()->stats.nb_recv + dur) /
27
- (ogs_diam_logger_self()->stats.nb_recv + 1);
28
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
29
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
30
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
31
/* Min, max */
32
- if (dur < ogs_diam_logger_self()->stats.shortest)
33
- ogs_diam_logger_self()->stats.shortest = dur;
34
- if (dur > ogs_diam_logger_self()->stats.longest)
35
- ogs_diam_logger_self()->stats.longest = dur;
36
+ if (dur < ogs_diam_stats_self()->stats.shortest)
37
+ ogs_diam_stats_self()->stats.shortest = dur;
38
+ if (dur > ogs_diam_stats_self()->stats.longest)
39
+ ogs_diam_stats_self()->stats.longest = dur;
40
} else {
41
- ogs_diam_logger_self()->stats.shortest = dur;
42
- ogs_diam_logger_self()->stats.longest = dur;
43
- ogs_diam_logger_self()->stats.avg = dur;
44
+ ogs_diam_stats_self()->stats.shortest = dur;
45
+ ogs_diam_stats_self()->stats.longest = dur;
46
+ ogs_diam_stats_self()->stats.avg = dur;
47
}
48
if (error)
49
- ogs_diam_logger_self()->stats.nb_errs++;
50
+ ogs_diam_stats_self()->stats.nb_errs++;
51
else
52
- ogs_diam_logger_self()->stats.nb_recv++;
53
+ ogs_diam_stats_self()->stats.nb_recv++;
54
55
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
56
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
57
58
/* Display how long it took */
59
if (ts.tv_nsec > sess_data->ts.tv_nsec)
60
61
ogs_assert(ret == 0);
62
63
/* Increment the counter */
64
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
65
- ogs_diam_logger_self()->stats.nb_sent++;
66
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
67
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
68
+ ogs_diam_stats_self()->stats.nb_sent++;
69
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
70
71
ogs_free(user_name);
72
}
73
74
}
75
76
/* Free the message */
77
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
78
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
79
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
80
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
81
- if (ogs_diam_logger_self()->stats.nb_recv) {
82
+ if (ogs_diam_stats_self()->stats.nb_recv) {
83
/* Ponderate in the avg */
84
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
85
- ogs_diam_logger_self()->stats.nb_recv + dur) /
86
- (ogs_diam_logger_self()->stats.nb_recv + 1);
87
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
88
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
89
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
90
/* Min, max */
91
- if (dur < ogs_diam_logger_self()->stats.shortest)
92
- ogs_diam_logger_self()->stats.shortest = dur;
93
- if (dur > ogs_diam_logger_self()->stats.longest)
94
- ogs_diam_logger_self()->stats.longest = dur;
95
+ if (dur < ogs_diam_stats_self()->stats.shortest)
96
+ ogs_diam_stats_self()->stats.shortest = dur;
97
+ if (dur > ogs_diam_stats_self()->stats.longest)
98
+ ogs_diam_stats_self()->stats.longest = dur;
99
} else {
100
- ogs_diam_logger_self()->stats.shortest = dur;
101
- ogs_diam_logger_self()->stats.longest = dur;
102
- ogs_diam_logger_self()->stats.avg = dur;
103
+ ogs_diam_stats_self()->stats.shortest = dur;
104
+ ogs_diam_stats_self()->stats.longest = dur;
105
+ ogs_diam_stats_self()->stats.avg = dur;
106
}
107
if (error)
108
- ogs_diam_logger_self()->stats.nb_errs++;
109
+ ogs_diam_stats_self()->stats.nb_errs++;
110
else
111
- ogs_diam_logger_self()->stats.nb_recv++;
112
+ ogs_diam_stats_self()->stats.nb_recv++;
113
114
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
115
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
116
117
/* Display how long it took */
118
if (ts.tv_nsec > sess_data->ts.tv_nsec)
119
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/udm/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/udm/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, "udm")) {
14
+ if ((!strcmp(root_key, "udm")) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t udm_iter;
17
ogs_yaml_iter_recurse(&root_iter, &udm_iter);
18
while (ogs_yaml_iter_next(&udm_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/udr/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/udr/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, "udr")) {
14
+ if ((!strcmp(root_key, "udr")) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t udr_iter;
17
ogs_yaml_iter_recurse(&root_iter, &udr_iter);
18
while (ogs_yaml_iter_next(&udr_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/src/upf/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/src/upf/context.c
Changed
19
1
2
int rv;
3
yaml_document_t *document = NULL;
4
ogs_yaml_iter_t root_iter;
5
+ int idx = 0;
6
7
document = ogs_app()->document;
8
ogs_assert(document);
9
10
while (ogs_yaml_iter_next(&root_iter)) {
11
const char *root_key = ogs_yaml_iter_key(&root_iter);
12
ogs_assert(root_key);
13
- if (!strcmp(root_key, "upf")) {
14
+ if ((!strcmp(root_key, "upf")) &&
15
+ (idx++ == ogs_app()->config_section_id)) {
16
ogs_yaml_iter_t upf_iter;
17
ogs_yaml_iter_recurse(&root_iter, &upf_iter);
18
while (ogs_yaml_iter_next(&upf_iter)) {
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/app/5gc-init.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/app/5gc-init.c
Changed
155
1
2
3
#include "test-app.h"
4
5
+/* If want to increase this number, check and modify run_threads() function
6
+ * for static integer to string conversion */
7
+#define OGS_MAX_NF_INSTANCES 4
8
+
9
static ogs_thread_t *nrf_thread = NULL;
10
static ogs_thread_t *scp_thread = NULL;
11
static ogs_thread_t *sepp_thread = NULL;
12
-static ogs_thread_t *upf_thread = NULL;
13
-static ogs_thread_t *smf_thread = NULL;
14
-static ogs_thread_t *amf_thread = NULL;
15
-static ogs_thread_t *ausf_thread = NULL;
16
-static ogs_thread_t *udm_thread = NULL;
17
-static ogs_thread_t *pcf_thread = NULL;
18
-static ogs_thread_t *nssf_thread = NULL;
19
-static ogs_thread_t *bsf_thread = NULL;
20
-static ogs_thread_t *udr_thread = NULL;
21
+static ogs_thread_t *upf_threadsOGS_MAX_NF_INSTANCES = { NULL };
22
+static ogs_thread_t *smf_threadsOGS_MAX_NF_INSTANCES = { NULL };
23
+static ogs_thread_t *amf_threadsOGS_MAX_NF_INSTANCES = { NULL };
24
+static ogs_thread_t *ausf_threadsOGS_MAX_NF_INSTANCES = { NULL };
25
+static ogs_thread_t *udm_threadsOGS_MAX_NF_INSTANCES = { NULL };
26
+static ogs_thread_t *pcf_threadsOGS_MAX_NF_INSTANCES = { NULL };
27
+static ogs_thread_t *nssf_threadsOGS_MAX_NF_INSTANCES = { NULL };
28
+static ogs_thread_t *bsf_threadsOGS_MAX_NF_INSTANCES = { NULL };
29
+static ogs_thread_t *udr_threadsOGS_MAX_NF_INSTANCES = { NULL };
30
+
31
+
32
+static void run_threads(const char *nf_name, int count,
33
+ const char *argv_out, int argv_out_idx, ogs_thread_t *threads)
34
+{
35
+ int i;
36
+
37
+ threads0 = test_child_create(nf_name, argv_out);
38
+
39
+ for (i = 1; i < count; i++) {
40
+ const char *idx_string = NULL;;
41
+
42
+ switch (i) {
43
+ case 1: idx_string = "1"; break;
44
+ case 2: idx_string = "2"; break;
45
+ case 3: idx_string = "3"; break;
46
+ default:
47
+ idx_string = ogs_msprintf("%d", i);
48
+ ogs_warn("Missing static conversion of integer to string");
49
+ break;
50
+ }
51
+ ogs_assert(idx_string);
52
+
53
+ argv_outargv_out_idx + 0 = "-k";
54
+ argv_outargv_out_idx + 1 = idx_string;
55
+ argv_outargv_out_idx + 2 = NULL;
56
+
57
+ threadsi = test_child_create(nf_name, argv_out);
58
+ }
59
+
60
+ // reset argv_out and remove the added "-k" parameter
61
+ argv_outargv_out_idx = NULL;
62
+}
63
64
int app_initialize(const char *const argv)
65
{
66
67
sepp_thread = test_child_create("sepp", argv_out);
68
69
if (ogs_global_conf()->parameter.no_upf == 0)
70
- upf_thread = test_child_create("upf", argv_out);
71
+ run_threads("upf", ogs_global_conf()->parameter.upf_count,
72
+ argv_out, i, upf_threads);
73
if (ogs_global_conf()->parameter.no_smf == 0)
74
- smf_thread = test_child_create("smf", argv_out);
75
-
76
+ run_threads("smf", ogs_global_conf()->parameter.smf_count,
77
+ argv_out, i, smf_threads);
78
if (ogs_global_conf()->parameter.no_amf == 0)
79
- amf_thread = test_child_create("amf", argv_out);
80
-
81
+ run_threads("amf", ogs_global_conf()->parameter.amf_count,
82
+ argv_out, i, amf_threads);
83
if (ogs_global_conf()->parameter.no_ausf == 0)
84
- ausf_thread = test_child_create("ausf", argv_out);
85
+ run_threads("ausf", ogs_global_conf()->parameter.ausf_count,
86
+ argv_out, i, ausf_threads);
87
if (ogs_global_conf()->parameter.no_udm == 0)
88
- udm_thread = test_child_create("udm", argv_out);
89
+ run_threads("udm", ogs_global_conf()->parameter.udm_count,
90
+ argv_out, i, udm_threads);
91
if (ogs_global_conf()->parameter.no_pcf == 0)
92
- pcf_thread = test_child_create("pcf", argv_out);
93
+ run_threads("pcf", ogs_global_conf()->parameter.pcf_count,
94
+ argv_out, i, pcf_threads);
95
if (ogs_global_conf()->parameter.no_nssf == 0)
96
- nssf_thread = test_child_create("nssf", argv_out);
97
+ run_threads("nssf", ogs_global_conf()->parameter.nssf_count,
98
+ argv_out, i, nssf_threads);
99
if (ogs_global_conf()->parameter.no_bsf == 0)
100
- bsf_thread = test_child_create("bsf", argv_out);
101
+ run_threads("bsf", ogs_global_conf()->parameter.bsf_count,
102
+ argv_out, i, bsf_threads);
103
if (ogs_global_conf()->parameter.no_udr == 0)
104
- udr_thread = test_child_create("udr", argv_out);
105
+ run_threads("udr", ogs_global_conf()->parameter.udr_count,
106
+ argv_out, i, udr_threads);
107
108
/*
109
* Wait for all sockets listening
110
111
*/
112
ogs_msleep(1000);
113
114
- return OGS_OK;;
115
+ return OGS_OK;
116
}
117
118
void app_terminate(void)
119
{
120
- if (amf_thread) ogs_thread_destroy(amf_thread);
121
+ int i;
122
123
- if (smf_thread) ogs_thread_destroy(smf_thread);
124
- if (upf_thread) ogs_thread_destroy(upf_thread);
125
-
126
- if (udr_thread) ogs_thread_destroy(udr_thread);
127
- if (nssf_thread) ogs_thread_destroy(nssf_thread);
128
- if (bsf_thread) ogs_thread_destroy(bsf_thread);
129
- if (pcf_thread) ogs_thread_destroy(pcf_thread);
130
- if (udm_thread) ogs_thread_destroy(udm_thread);
131
- if (ausf_thread) ogs_thread_destroy(ausf_thread);
132
+ for (i = 0; i < OGS_MAX_NF_INSTANCES; i++) {
133
+ if (amf_threadsi)
134
+ ogs_thread_destroy(amf_threadsi);
135
+ if (smf_threadsi)
136
+ ogs_thread_destroy(smf_threadsi);
137
+ if (upf_threadsi)
138
+ ogs_thread_destroy(upf_threadsi);
139
+ if (udr_threadsi)
140
+ ogs_thread_destroy(udr_threadsi);
141
+ if (nssf_threadsi)
142
+ ogs_thread_destroy(nssf_threadsi);
143
+ if (bsf_threadsi)
144
+ ogs_thread_destroy(bsf_threadsi);
145
+ if (pcf_threadsi)
146
+ ogs_thread_destroy(pcf_threadsi);
147
+ if (udm_threadsi)
148
+ ogs_thread_destroy(udm_threadsi);
149
+ if (ausf_threadsi)
150
+ ogs_thread_destroy(ausf_threadsi);
151
+ }
152
153
if (sepp_thread) ogs_thread_destroy(sepp_thread);
154
if (scp_thread) ogs_thread_destroy(scp_thread);
155
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/app/app-init.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/app/app-init.c
Changed
10
1
2
*/
3
ogs_msleep(5000);
4
5
- return OGS_OK;;
6
+ return OGS_OK;
7
}
8
9
void app_terminate(void)
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/common/application.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/common/application.c
Changed
31
1
2
ogs_assert(rv == OGS_OK);
3
}
4
5
-#define MAX_CHILD_PROCESS 16
6
+#define MAX_CHILD_PROCESS 32
7
#define OGS_ARG_MAX 256
8
9
static ogs_proc_t processMAX_CHILD_PROCESS;
10
11
int ret = 0, out_return_code = 0;
12
13
current = &processprocess_num++;
14
+
15
+ if (process_num > MAX_CHILD_PROCESS) {
16
+ ogs_fatal("Process limit reached");
17
+ ogs_assert_if_reached();
18
+ }
19
+
20
ret = ogs_proc_create(commandLine,
21
ogs_proc_option_combined_stdout_stderr|
22
ogs_proc_option_inherit_environment,
23
24
commandLine0 = command;
25
26
child = ogs_thread_create(child_main, commandLine);
27
+
28
ogs_msleep(50);
29
30
return child;
31
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/common/context.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/common/context.c
Changed
31
1
2
if (snode) test_self()->s1ap_addr6 = snode->addr;
3
4
snode = ogs_list_first(&test_self()->ngap_list);
5
- if (snode) test_self()->ngap_addr = snode->addr;
6
+
7
+ if (snode) {
8
+ test_self()->ngap_addr = snode->addr;
9
+ snode = ogs_list_next(snode);
10
+ }
11
+ if (snode) test_self()->ngap2_addr = snode->addr;
12
+
13
snode = ogs_list_first(&test_self()->ngap_list6);
14
- if (snode) test_self()->ngap_addr6 = snode->addr;
15
+ if (snode) {
16
+ test_self()->ngap_addr6 = snode->addr;
17
+ snode = ogs_list_next(snode);
18
+ }
19
+ if (snode) test_self()->ngap2_addr6 = snode->addr;
20
21
if (test_self()->e_served_taiindex.list2.num) {
22
memcpy(&test_self()->e_tai,
23
24
while (ogs_yaml_iter_next(&root_iter)) {
25
const char *root_key = ogs_yaml_iter_key(&root_iter);
26
ogs_assert(root_key);
27
+
28
if (!strcmp(root_key, "amf")) {
29
ogs_yaml_iter_t amf_iter;
30
ogs_yaml_iter_recurse(&root_iter, &amf_iter);
31
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/common/context.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/common/context.h
Changed
11
1
2
ogs_list_t ngap_list; /* AMF NGAP IPv4 Server List */
3
ogs_list_t ngap_list6; /* AMF NGAP IPv6 Server List */
4
ogs_sockaddr_t *ngap_addr; /* AMF NGAP IPv4 Address */
5
+ ogs_sockaddr_t *ngap2_addr; /* OLD AMF NGAP IPv4 Address */
6
ogs_sockaddr_t *ngap_addr6; /* AMF NGAP IPv6 Address */
7
+ ogs_sockaddr_t *ngap2_addr6; /* OLD AMF NGAP IPv6 Address */
8
9
uint16_t s1ap_port; /* Default S1AP Port */
10
ogs_list_t s1ap_list; /* MME S1AP IPv4 Server List */
11
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/common/sctp.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/common/sctp.c
Changed
39
1
2
return node;
3
}
4
5
-ogs_socknode_t *testngap_client(int family)
6
+ogs_socknode_t *testngap_client(int index, int family)
7
{
8
int rv;
9
ogs_sockaddr_t *addr = NULL;
10
ogs_socknode_t *node = NULL;
11
ogs_sock_t *sock = NULL;
12
13
- if (family == AF_INET6)
14
- ogs_assert(OGS_OK ==
15
- ogs_copyaddrinfo(&addr, test_self()->ngap_addr6));
16
- else
17
- ogs_assert(OGS_OK ==
18
- ogs_copyaddrinfo(&addr, test_self()->ngap_addr));
19
+ if (index == 1) {
20
+ if (family == AF_INET6)
21
+ ogs_assert(OGS_OK ==
22
+ ogs_copyaddrinfo(&addr, test_self()->ngap_addr6));
23
+ else
24
+ ogs_assert(OGS_OK ==
25
+ ogs_copyaddrinfo(&addr, test_self()->ngap_addr));
26
+
27
+ } else if (index == 2) {
28
+ if (family == AF_INET6)
29
+ ogs_assert(OGS_OK ==
30
+ ogs_copyaddrinfo(&addr, test_self()->ngap2_addr6));
31
+ else
32
+ ogs_assert(OGS_OK ==
33
+ ogs_copyaddrinfo(&addr, test_self()->ngap2_addr));
34
+ } else
35
+ ogs_assert_if_reached();
36
37
ogs_assert(addr);
38
39
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/common/sctp.h -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/common/sctp.h
Changed
10
1
2
ogs_socknode_t *testsctp_server(const char *ipstr, int port);
3
ogs_socknode_t *testsctp_client(const char *ipstr, int port);
4
ogs_socknode_t *tests1ap_client(int family);
5
-ogs_socknode_t *testngap_client(int family);
6
+ogs_socknode_t *testngap_client(int index, int family);
7
8
int testsctp_send(ogs_socknode_t *node, ogs_pkbuf_t *pkbuf,
9
int ppid, uint16_t stream_no, int type);
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/handover/5gc-n2-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/handover/5gc-n2-test.c
Changed
66
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* Two gNB connects to AMF */
5
- ngap1 = testngap_client(AF_INET);
6
+ ngap1 = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap1);
8
9
- ngap2 = testngap_client(AF_INET);
10
+ ngap2 = testngap_client(1, AF_INET);
11
ABTS_PTR_NOTNULL(tc, ngap2);
12
13
/* Two gNB connects to UPF */
14
15
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
16
17
/* Two gNB connects to AMF */
18
- ngap1 = testngap_client(AF_INET);
19
+ ngap1 = testngap_client(1, AF_INET);
20
ABTS_PTR_NOTNULL(tc, ngap1);
21
22
- ngap2 = testngap_client(AF_INET);
23
+ ngap2 = testngap_client(1, AF_INET);
24
ABTS_PTR_NOTNULL(tc, ngap2);
25
26
/* Two gNB connects to UPF */
27
28
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
29
30
/* Two gNB connects to AMF */
31
- ngap1 = testngap_client(AF_INET);
32
+ ngap1 = testngap_client(1, AF_INET);
33
ABTS_PTR_NOTNULL(tc, ngap1);
34
35
- ngap2 = testngap_client(AF_INET);
36
+ ngap2 = testngap_client(1, AF_INET);
37
ABTS_PTR_NOTNULL(tc, ngap2);
38
39
/* Two gNB connects to UPF */
40
41
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
42
43
/* Two gNB connects to AMF */
44
- ngap1 = testngap_client(AF_INET);
45
+ ngap1 = testngap_client(1, AF_INET);
46
ABTS_PTR_NOTNULL(tc, ngap1);
47
48
- ngap2 = testngap_client(AF_INET);
49
+ ngap2 = testngap_client(1, AF_INET);
50
ABTS_PTR_NOTNULL(tc, ngap2);
51
52
/* Two gNB connects to UPF */
53
54
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
55
56
/* Two gNB connects to AMF */
57
- ngap1 = testngap_client(AF_INET);
58
+ ngap1 = testngap_client(1, AF_INET);
59
ABTS_PTR_NOTNULL(tc, ngap1);
60
61
- ngap2 = testngap_client(AF_INET);
62
+ ngap2 = testngap_client(1, AF_INET);
63
ABTS_PTR_NOTNULL(tc, ngap2);
64
65
/* Two gNB connects to UPF */
66
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/handover/5gc-xn-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/handover/5gc-xn-test.c
Changed
14
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* Two gNB connects to AMF */
5
- ngap1 = testngap_client(AF_INET);
6
+ ngap1 = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap1);
8
9
- ngap2 = testngap_client(AF_INET);
10
+ ngap2 = testngap_client(1, AF_INET);
11
ABTS_PTR_NOTNULL(tc, ngap2);
12
13
/* Two gNB connects to UPF */
14
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/meson.build -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/meson.build
Changed
6
1
2
subdir('310014')
3
subdir('handover')
4
subdir('non3gpp')
5
+subdir('transfer')
6
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/non3gpp/diameter-s6b-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/non3gpp/diameter-s6b-path.c
Changed
27
1
2
ogs_assert(ret == 0);
3
4
/* Add this value to the stats */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_echoed++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) ==0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_echoed++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) ==0);
11
12
return 0;
13
14
15
ogs_assert(ret == 0);
16
17
/* Add this value to the stats */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
- ogs_diam_logger_self()->stats.nb_echoed++;
20
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) ==0);
21
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
22
+ ogs_diam_stats_self()->stats.nb_echoed++;
23
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) ==0);
24
25
return 0;
26
27
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/non3gpp/diameter-swx-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/non3gpp/diameter-swx-path.c
Changed
119
1
2
ogs_assert(ret == 0);
3
4
/* Increment the counter */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_sent++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_sent++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
11
}
12
13
/* Callback for incoming Multimedia-Auth-Answer messages */
14
15
ogs_assert(err && !exp_err && result_code == ER_DIAMETER_SUCCESS);
16
17
/* Free the message */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
20
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
21
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
22
- if (ogs_diam_logger_self()->stats.nb_recv) {
23
+ if (ogs_diam_stats_self()->stats.nb_recv) {
24
/* Ponderate in the avg */
25
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
26
- ogs_diam_logger_self()->stats.nb_recv + dur) /
27
- (ogs_diam_logger_self()->stats.nb_recv + 1);
28
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
29
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
30
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
31
/* Min, max */
32
- if (dur < ogs_diam_logger_self()->stats.shortest)
33
- ogs_diam_logger_self()->stats.shortest = dur;
34
- if (dur > ogs_diam_logger_self()->stats.longest)
35
- ogs_diam_logger_self()->stats.longest = dur;
36
+ if (dur < ogs_diam_stats_self()->stats.shortest)
37
+ ogs_diam_stats_self()->stats.shortest = dur;
38
+ if (dur > ogs_diam_stats_self()->stats.longest)
39
+ ogs_diam_stats_self()->stats.longest = dur;
40
} else {
41
- ogs_diam_logger_self()->stats.shortest = dur;
42
- ogs_diam_logger_self()->stats.longest = dur;
43
- ogs_diam_logger_self()->stats.avg = dur;
44
+ ogs_diam_stats_self()->stats.shortest = dur;
45
+ ogs_diam_stats_self()->stats.longest = dur;
46
+ ogs_diam_stats_self()->stats.avg = dur;
47
}
48
if (error)
49
- ogs_diam_logger_self()->stats.nb_errs++;
50
+ ogs_diam_stats_self()->stats.nb_errs++;
51
else
52
- ogs_diam_logger_self()->stats.nb_recv++;
53
+ ogs_diam_stats_self()->stats.nb_recv++;
54
55
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
56
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
57
58
/* Display how long it took */
59
if (ts.tv_nsec > sess_data->ts.tv_nsec)
60
61
ogs_assert(ret == 0);
62
63
/* Increment the counter */
64
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
65
- ogs_diam_logger_self()->stats.nb_sent++;
66
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
67
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
68
+ ogs_diam_stats_self()->stats.nb_sent++;
69
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
70
}
71
72
/* Callback for incoming Server-Assignment-Answer messages */
73
74
ogs_assert(err && !exp_err && result_code == ER_DIAMETER_SUCCESS);
75
76
/* Free the message */
77
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
78
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
79
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
80
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
81
- if (ogs_diam_logger_self()->stats.nb_recv) {
82
+ if (ogs_diam_stats_self()->stats.nb_recv) {
83
/* Ponderate in the avg */
84
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
85
- ogs_diam_logger_self()->stats.nb_recv + dur) /
86
- (ogs_diam_logger_self()->stats.nb_recv + 1);
87
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
88
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
89
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
90
/* Min, max */
91
- if (dur < ogs_diam_logger_self()->stats.shortest)
92
- ogs_diam_logger_self()->stats.shortest = dur;
93
- if (dur > ogs_diam_logger_self()->stats.longest)
94
- ogs_diam_logger_self()->stats.longest = dur;
95
+ if (dur < ogs_diam_stats_self()->stats.shortest)
96
+ ogs_diam_stats_self()->stats.shortest = dur;
97
+ if (dur > ogs_diam_stats_self()->stats.longest)
98
+ ogs_diam_stats_self()->stats.longest = dur;
99
} else {
100
- ogs_diam_logger_self()->stats.shortest = dur;
101
- ogs_diam_logger_self()->stats.longest = dur;
102
- ogs_diam_logger_self()->stats.avg = dur;
103
+ ogs_diam_stats_self()->stats.shortest = dur;
104
+ ogs_diam_stats_self()->stats.longest = dur;
105
+ ogs_diam_stats_self()->stats.avg = dur;
106
}
107
if (error)
108
- ogs_diam_logger_self()->stats.nb_errs++;
109
+ ogs_diam_stats_self()->stats.nb_errs++;
110
else
111
- ogs_diam_logger_self()->stats.nb_recv++;
112
+ ogs_diam_stats_self()->stats.nb_recv++;
113
114
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
115
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
116
117
/* Display how long it took */
118
if (ts.tv_nsec > sess_data->ts.tv_nsec)
119
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/auth-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/auth-test.c
Changed
19
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/crash-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/crash-test.c
Changed
46
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
20
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
21
22
/* gNB connects to AMF */
23
- ngap = testngap_client(AF_INET);
24
+ ngap = testngap_client(1, AF_INET);
25
ABTS_PTR_NOTNULL(tc, ngap);
26
27
/* gNB connects to UPF */
28
29
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
30
31
/* gNB connects to AMF */
32
- ngap = testngap_client(AF_INET);
33
+ ngap = testngap_client(1, AF_INET);
34
ABTS_PTR_NOTNULL(tc, ngap);
35
36
/* gNB connects to UPF */
37
38
ogs_pkbuf_t *recvbuf;
39
ogs_ngap_message_t message;
40
41
- ngap = testngap_client(AF_INET);
42
+ ngap = testngap_client(1, AF_INET);
43
ABTS_PTR_NOTNULL(tc, ngap);
44
45
sendbuf = testngap_build_ng_setup_request(0x4000, 22);
46
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/dereg-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/dereg-test.c
Changed
55
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
20
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
21
22
/* gNB connects to AMF */
23
- ngap = testngap_client(AF_INET);
24
+ ngap = testngap_client(1, AF_INET);
25
ABTS_PTR_NOTNULL(tc, ngap);
26
27
/* gNB connects to UPF */
28
29
ogs_assert(sess);
30
31
/* gNB connects to AMF */
32
- ngap = testngap_client(AF_INET);
33
+ ngap = testngap_client(1, AF_INET);
34
ABTS_PTR_NOTNULL(tc, ngap);
35
36
/* gNB connects to UPF */
37
38
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
39
40
/* gNB connects to AMF */
41
- ngap = testngap_client(AF_INET);
42
+ ngap = testngap_client(1, AF_INET);
43
ABTS_PTR_NOTNULL(tc, ngap);
44
45
/* gNB connects to UPF */
46
47
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
48
49
/* gNB connects to AMF */
50
- ngap = testngap_client(AF_INET);
51
+ ngap = testngap_client(1, AF_INET);
52
ABTS_PTR_NOTNULL(tc, ngap);
53
54
/* gNB connects to UPF */
55
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/ecc-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/ecc-test.c
Changed
37
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
20
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
21
22
/* gNB connects to AMF */
23
- ngap = testngap_client(AF_INET);
24
+ ngap = testngap_client(1, AF_INET);
25
ABTS_PTR_NOTNULL(tc, ngap);
26
27
/* gNB connects to UPF */
28
29
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
30
31
/* gNB connects to AMF */
32
- ngap = testngap_client(AF_INET);
33
+ ngap = testngap_client(1, AF_INET);
34
ABTS_PTR_NOTNULL(tc, ngap);
35
36
/* gNB connects to UPF */
37
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/gmm-status-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/gmm-status-test.c
Changed
10
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/guti-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/guti-test.c
Changed
39
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->k_string = "465b5ce8b199b49faa5f0a2ee238a6bc";
12
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
13
14
- /* gNB connects to AMF(default configuration) */
15
- ngap = testngap_client(AF_INET);
16
+ /* gNB connects to AMF */
17
+ ngap = testngap_client(1, AF_INET);
18
ABTS_PTR_NOTNULL(tc, ngap);
19
20
/* gNB connects to UPF */
21
22
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
23
24
/* gNB connects to AMF */
25
- ngap = testngap_client(AF_INET);
26
+ ngap = testngap_client(1, AF_INET);
27
ABTS_PTR_NOTNULL(tc, ngap);
28
29
/* gNB connects to UPF */
30
31
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
32
33
/* gNB connects to AMF */
34
- ngap = testngap_client(AF_INET);
35
+ ngap = testngap_client(1, AF_INET);
36
ABTS_PTR_NOTNULL(tc, ngap);
37
38
/* gNB connects to UPF */
39
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/identity-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/identity-test.c
Changed
19
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/idle-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/idle-test.c
Changed
55
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
20
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
21
22
/* gNB connects to AMF */
23
- ngap = testngap_client(AF_INET);
24
+ ngap = testngap_client(1, AF_INET);
25
ABTS_PTR_NOTNULL(tc, ngap);
26
27
/* gNB connects to UPF */
28
29
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
30
31
/* gNB connects to AMF */
32
- ngap = testngap_client(AF_INET);
33
+ ngap = testngap_client(1, AF_INET);
34
ABTS_PTR_NOTNULL(tc, ngap);
35
36
/* gNB connects to UPF */
37
38
ogs_assert(sess);
39
40
/* gNB connects to AMF */
41
- ngap = testngap_client(AF_INET);
42
+ ngap = testngap_client(1, AF_INET);
43
ABTS_PTR_NOTNULL(tc, ngap);
44
45
/* gNB connects to UPF */
46
47
ogs_assert(sess);
48
49
/* gNB connects to AMF */
50
- ngap = testngap_client(AF_INET);
51
+ ngap = testngap_client(1, AF_INET);
52
ABTS_PTR_NOTNULL(tc, ngap);
53
54
/* gNB connects to UPF */
55
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/multi-ue-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/multi-ue-test.c
Changed
10
1
2
bson_t *doc = NULL;
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/reset-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/reset-test.c
Changed
28
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
20
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
21
22
/* gNB connects to AMF */
23
- ngap = testngap_client(AF_INET);
24
+ ngap = testngap_client(1, AF_INET);
25
ABTS_PTR_NOTNULL(tc, ngap);
26
27
/* gNB connects to UPF */
28
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/simple-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/simple-test.c
Changed
10
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/registration/ue-context-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/registration/ue-context-test.c
Changed
46
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
20
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
21
22
/* gNB connects to AMF */
23
- ngap = testngap_client(AF_INET);
24
+ ngap = testngap_client(1, AF_INET);
25
ABTS_PTR_NOTNULL(tc, ngap);
26
27
/* gNB connects to UPF */
28
29
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
30
31
/* gNB connects to AMF */
32
- ngap = testngap_client(AF_INET);
33
+ ngap = testngap_client(1, AF_INET);
34
ABTS_PTR_NOTNULL(tc, ngap);
35
36
/* gNB connects to UPF */
37
38
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
39
40
/* gNB connects to AMF */
41
- ngap = testngap_client(AF_INET);
42
+ ngap = testngap_client(1, AF_INET);
43
ABTS_PTR_NOTNULL(tc, ngap);
44
45
/* gNB connects to UPF */
46
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/slice/different-dnn-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/slice/different-dnn-test.c
Changed
10
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/slice/paging-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/slice/paging-test.c
Changed
82
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
20
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
21
22
/* gNB connects to AMF */
23
- ngap = testngap_client(AF_INET);
24
+ ngap = testngap_client(1, AF_INET);
25
ABTS_PTR_NOTNULL(tc, ngap);
26
27
/* gNB connects to UPF */
28
29
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
30
31
/* gNB connects to AMF */
32
- ngap = testngap_client(AF_INET);
33
+ ngap = testngap_client(1, AF_INET);
34
ABTS_PTR_NOTNULL(tc, ngap);
35
36
/* gNB connects to UPF */
37
38
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
39
40
/* gNB connects to AMF */
41
- ngap = testngap_client(AF_INET);
42
+ ngap = testngap_client(1, AF_INET);
43
ABTS_PTR_NOTNULL(tc, ngap);
44
45
/* gNB connects to UPF */
46
47
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
48
49
/* gNB connects to AMF */
50
- ngap = testngap_client(AF_INET);
51
+ ngap = testngap_client(1, AF_INET);
52
ABTS_PTR_NOTNULL(tc, ngap);
53
54
/* gNB connects to UPF */
55
56
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
57
58
/* gNB connects to AMF */
59
- ngap = testngap_client(AF_INET);
60
+ ngap = testngap_client(1, AF_INET);
61
ABTS_PTR_NOTNULL(tc, ngap);
62
63
/* gNB connects to UPF */
64
65
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
66
67
/* gNB connects to AMF */
68
- ngap = testngap_client(AF_INET);
69
+ ngap = testngap_client(1, AF_INET);
70
ABTS_PTR_NOTNULL(tc, ngap);
71
72
/* gNB connects to UPF */
73
74
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
75
76
/* gNB connects to AMF */
77
- ngap = testngap_client(AF_INET);
78
+ ngap = testngap_client(1, AF_INET);
79
ABTS_PTR_NOTNULL(tc, ngap);
80
81
/* gNB connects to UPF */
82
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/slice/same-dnn-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/slice/same-dnn-test.c
Changed
19
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/transfer
Added
2
1
+(directory)
2
open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/transfer/abts-main.c
Added
68
1
2
+/*
3
+ * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ *
5
+ * This file is part of Open5GS.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Affero General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
20
+
21
+#include "test-app.h"
22
+
23
+abts_suite * test_ue_context_transfer(abts_suite *suite);
24
+
25
+const struct testlist {
26
+ abts_suite *(*func)(abts_suite *suite);
27
+} alltests = {
28
+ {test_ue_context_transfer},
29
+ {NULL},
30
+};
31
+
32
+static void terminate(void)
33
+{
34
+ ogs_msleep(50);
35
+
36
+ test_child_terminate();
37
+ app_terminate();
38
+
39
+ test_5gc_final();
40
+ ogs_app_terminate();
41
+}
42
+
43
+static void initialize(const char *const argv)
44
+{
45
+ int rv;
46
+
47
+ rv = ogs_app_initialize(NULL, NULL, argv);
48
+ ogs_assert(rv == OGS_OK);
49
+ test_5gc_init();
50
+
51
+ rv = app_initialize(argv);
52
+ ogs_assert(rv == OGS_OK);
53
+}
54
+
55
+int main(int argc, const char *const argv)
56
+{
57
+ int i;
58
+ abts_suite *suite = NULL;
59
+
60
+ atexit(terminate);
61
+ test_app_run(argc, argv, "transfer.yaml", initialize);
62
+
63
+ for (i = 0; alltestsi.func; i++)
64
+ suite = alltestsi.func(suite);
65
+
66
+ return abts_report(suite);
67
+}
68
open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/transfer/meson.build
Added
30
1
2
+# Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
3
+
4
+# This file is part of Open5GS.
5
+
6
+# This program is free software: you can redistribute it and/or modify
7
+# it under the terms of the GNU Affero General Public License as published by
8
+# the Free Software Foundation, either version 3 of the License, or
9
+# (at your option) any later version.
10
+#
11
+# This program is distributed in the hope that it will be useful,
12
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+# GNU General Public License for more details.
15
+#
16
+# You should have received a copy of the GNU General Public License
17
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
18
+
19
+testapp_transfer_sources = files('''
20
+ abts-main.c
21
+ ue-context-transfer-test.c
22
+'''.split())
23
+
24
+testapp_transfer_exe = executable('transfer',
25
+ sources : testapp_transfer_sources,
26
+ c_args : testunit_core_cc_flags,
27
+ dependencies : libtest5gc_dep)
28
+
29
+test('transfer', testapp_transfer_exe, is_parallel : false, suite: '5gc')
30
open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/transfer/ue-context-transfer-test.c
Added
201
1
2
+/*
3
+ * Copyright (C) 2019,2020 by Sukchan Lee <acetcom@gmail.com>
4
+ *
5
+ * This file is part of Open5GS.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Affero General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
20
+
21
+#include "test-common.h"
22
+
23
+static void test1_func(abts_case *tc, void *data)
24
+{
25
+ int rv;
26
+ ogs_socknode_t *ngap1, *ngap2; /* ngap1 - Old AMF ; ngap2 - Target AMF */
27
+ ogs_socknode_t *gtpu1, *gtpu2;
28
+ ogs_pkbuf_t *gmmbuf;
29
+ ogs_pkbuf_t *gsmbuf;
30
+ ogs_pkbuf_t *nasbuf;
31
+ ogs_pkbuf_t *sendbuf;
32
+ ogs_pkbuf_t *recvbuf;
33
+ ogs_pkbuf_t *recvbuf_target;
34
+ ogs_ngap_message_t message;
35
+ int i;
36
+
37
+ uint8_t tmpOGS_HUGE_LEN;
38
+ char *_gtp_payload = "34ff0024"
39
+ "0000000100000085 010002004500001c 0c0b000040015a7a 0a2d00010a2d0002"
40
+ "00000964cd7c291f";
41
+
42
+ /* Test: 1 UE, Old AMF, Target AMF,
43
+ * register to Old AMF, PDU session establishment, session release, deregister,
44
+ * register to Target AMF with empty 5G GUTI, identity request and response,
45
+ * NO UE context transfer, NO Registration status update,
46
+ * PDU session establishment, session release, deregister */
47
+
48
+ #define NUM_OF_TEST_UE_1 1
49
+
50
+ ogs_nas_5gs_mobile_identity_suci_t mobile_identity_suci;
51
+ test_ue_t *test_ueNUM_OF_TEST_UE_1;
52
+ test_ue_t *test_ue_targetNUM_OF_TEST_UE_1;
53
+ test_sess_t *sess = NULL;
54
+ test_bearer_t *qos_flow = NULL;
55
+
56
+ bson_t *doc = NULL;
57
+
58
+ /* First gNB connects to Target AMF */
59
+ ngap2 = testngap_client(2, AF_INET);
60
+ ABTS_PTR_NOTNULL(tc, ngap2);
61
+
62
+ /* Second gNB connects to Old AMF */
63
+ ngap1 = testngap_client(1, AF_INET);
64
+ ABTS_PTR_NOTNULL(tc, ngap1);
65
+
66
+ /* Two gNB connects to UPF */
67
+ gtpu1 = test_gtpu_server(1, AF_INET);
68
+ ABTS_PTR_NOTNULL(tc, gtpu1);
69
+
70
+ gtpu2 = test_gtpu_server(2, AF_INET);
71
+ ABTS_PTR_NOTNULL(tc, gtpu2);
72
+
73
+ /* NG-Setup Reqeust/Response for Source gNB */
74
+ sendbuf = testngap_build_ng_setup_request(0x4000, 28);
75
+ ABTS_PTR_NOTNULL(tc, sendbuf);
76
+ rv = testgnb_ngap_send(ngap2, sendbuf);
77
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
78
+
79
+ recvbuf = testgnb_ngap_read(ngap2);
80
+ ABTS_PTR_NOTNULL(tc, recvbuf);
81
+ testngap_recv(test_ue, recvbuf);
82
+
83
+ /* NG-Setup Reqeust/Response for Target gNB */
84
+ sendbuf = testngap_build_ng_setup_request(0x4001, 28);
85
+ ABTS_PTR_NOTNULL(tc, sendbuf);
86
+ rv = testgnb_ngap_send(ngap1, sendbuf);
87
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
88
+
89
+ recvbuf_target = testgnb_ngap_read(ngap1);
90
+ ABTS_PTR_NOTNULL(tc, recvbuf_target);
91
+ testngap_recv(test_ue_target, recvbuf_target);
92
+
93
+ /* Register to Old AMF */
94
+
95
+ for (i = 0; i < NUM_OF_TEST_UE_1; i++) {
96
+ const char *scheme_output = {
97
+ "0000000001",
98
+ "0000000002",
99
+ "0000000003",
100
+ "0000000004",
101
+ "0000000005",
102
+ };
103
+
104
+ /* Setup Test UE & Session Context */
105
+ memset(&mobile_identity_suci, 0, sizeof(mobile_identity_suci));
106
+
107
+ mobile_identity_suci.h.supi_format = OGS_NAS_5GS_SUPI_FORMAT_IMSI;
108
+ mobile_identity_suci.h.type = OGS_NAS_5GS_MOBILE_IDENTITY_SUCI;
109
+ mobile_identity_suci.routing_indicator1 = 0;
110
+ mobile_identity_suci.routing_indicator2 = 0xf;
111
+ mobile_identity_suci.routing_indicator3 = 0xf;
112
+ mobile_identity_suci.routing_indicator4 = 0xf;
113
+ mobile_identity_suci.protection_scheme_id = OGS_PROTECTION_SCHEME_NULL;
114
+ mobile_identity_suci.home_network_pki_value = 0;
115
+
116
+ test_uei = test_ue_add_by_suci(
117
+ &mobile_identity_suci, scheme_outputi);
118
+ ogs_assert(test_uei);
119
+
120
+ test_uei->nr_cgi.cell_id = 0x40001;
121
+
122
+ test_uei->nas.registration.tsc = 0;
123
+ test_uei->nas.registration.ksi = OGS_NAS_KSI_NO_KEY_IS_AVAILABLE;
124
+ test_uei->nas.registration.follow_on_request = 1;
125
+ test_uei->nas.registration.value = OGS_NAS_5GS_REGISTRATION_TYPE_INITIAL;
126
+
127
+ test_uei->k_string = "465b5ce8b199b49faa5f0a2ee238a6bc";
128
+ test_uei->opc_string = "e8ed289deba952e4283b54e88e6183ca";
129
+ }
130
+
131
+ for (i = 0; i < NUM_OF_TEST_UE_1; i++) {
132
+ if (i > 0)
133
+ test_uei->ran_ue_ngap_id = test_uei-1->ran_ue_ngap_id;
134
+ else
135
+ test_uei->ran_ue_ngap_id = 0;
136
+
137
+ /* Send PDU session establishment request */
138
+ sess = test_sess_add_by_dnn_and_psi(test_uei, "internet", 5);
139
+ ogs_assert(sess);
140
+
141
+ /********** Insert Subscriber in Database */
142
+ doc = test_db_new_simple(test_uei);
143
+ ABTS_PTR_NOTNULL(tc, doc);
144
+ ABTS_INT_EQUAL(tc, OGS_OK, test_db_insert_ue(test_uei, doc));
145
+
146
+ /* Send Registration request */
147
+ test_uei->registration_request_param.guti = 1;
148
+ gmmbuf = testgmm_build_registration_request(test_uei, NULL, false, false);
149
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
150
+
151
+ test_uei->registration_request_param.gmm_capability = 1;
152
+ test_uei->registration_request_param.s1_ue_network_capability = 1;
153
+ test_uei->registration_request_param.requested_nssai = 1;
154
+ test_uei->registration_request_param.last_visited_registered_tai = 1;
155
+ test_uei->registration_request_param.ue_usage_setting = 1;
156
+ nasbuf = testgmm_build_registration_request(test_uei, NULL, false, false);
157
+ ABTS_PTR_NOTNULL(tc, nasbuf);
158
+
159
+ sendbuf = testngap_build_initial_ue_message(test_uei, gmmbuf,
160
+ NGAP_RRCEstablishmentCause_mo_Signalling, false, true);
161
+ ABTS_PTR_NOTNULL(tc, sendbuf);
162
+ rv = testgnb_ngap_send(ngap1, sendbuf);
163
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
164
+
165
+ /* Receive Identity request */
166
+ recvbuf = testgnb_ngap_read(ngap1);
167
+ ABTS_PTR_NOTNULL(tc, recvbuf);
168
+ testngap_recv(test_uei, recvbuf);
169
+
170
+ /* Send Identity response */
171
+ gmmbuf = testgmm_build_identity_response(test_uei);
172
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
173
+ sendbuf = testngap_build_uplink_nas_transport(test_uei, gmmbuf);
174
+ ABTS_PTR_NOTNULL(tc, sendbuf);
175
+ rv = testgnb_ngap_send(ngap1, sendbuf);
176
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
177
+
178
+ /* Receive Authentication request */
179
+ recvbuf = testgnb_ngap_read(ngap1);
180
+ ABTS_PTR_NOTNULL(tc, recvbuf);
181
+ testngap_recv(test_uei, recvbuf);
182
+
183
+ /* Send Authentication response */
184
+ gmmbuf = testgmm_build_authentication_response(test_uei);
185
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
186
+ sendbuf = testngap_build_uplink_nas_transport(test_uei, gmmbuf);
187
+ ABTS_PTR_NOTNULL(tc, sendbuf);
188
+ rv = testgnb_ngap_send(ngap1, sendbuf);
189
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
190
+
191
+ /* Receive Security mode command */
192
+ recvbuf = testgnb_ngap_read(ngap1);
193
+ ABTS_PTR_NOTNULL(tc, recvbuf);
194
+ testngap_recv(test_uei, recvbuf);
195
+
196
+ /* Send Security mode complete */
197
+ gmmbuf = testgmm_build_security_mode_complete(test_uei, nasbuf);
198
+ ABTS_PTR_NOTNULL(tc, gmmbuf);
199
+ sendbuf = testngap_build_uplink_nas_transport(test_uei, gmmbuf);
200
+ ABTS_PTR_NOTNULL(tc, sendbuf);
201
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/volte/diameter-cx-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/volte/diameter-cx-path.c
Changed
201
1
2
ogs_assert(ret == 0);
3
4
/* Increment the counter */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_sent++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_sent++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
11
}
12
13
/* Callback for incoming User-Authorization-Answer messages */
14
15
ogs_assert(!err && exp_err);
16
17
/* Free the message */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
20
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
21
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
22
- if (ogs_diam_logger_self()->stats.nb_recv) {
23
+ if (ogs_diam_stats_self()->stats.nb_recv) {
24
/* Ponderate in the avg */
25
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
26
- ogs_diam_logger_self()->stats.nb_recv + dur) /
27
- (ogs_diam_logger_self()->stats.nb_recv + 1);
28
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
29
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
30
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
31
/* Min, max */
32
- if (dur < ogs_diam_logger_self()->stats.shortest)
33
- ogs_diam_logger_self()->stats.shortest = dur;
34
- if (dur > ogs_diam_logger_self()->stats.longest)
35
- ogs_diam_logger_self()->stats.longest = dur;
36
+ if (dur < ogs_diam_stats_self()->stats.shortest)
37
+ ogs_diam_stats_self()->stats.shortest = dur;
38
+ if (dur > ogs_diam_stats_self()->stats.longest)
39
+ ogs_diam_stats_self()->stats.longest = dur;
40
} else {
41
- ogs_diam_logger_self()->stats.shortest = dur;
42
- ogs_diam_logger_self()->stats.longest = dur;
43
- ogs_diam_logger_self()->stats.avg = dur;
44
+ ogs_diam_stats_self()->stats.shortest = dur;
45
+ ogs_diam_stats_self()->stats.longest = dur;
46
+ ogs_diam_stats_self()->stats.avg = dur;
47
}
48
if (error)
49
- ogs_diam_logger_self()->stats.nb_errs++;
50
+ ogs_diam_stats_self()->stats.nb_errs++;
51
else
52
- ogs_diam_logger_self()->stats.nb_recv++;
53
+ ogs_diam_stats_self()->stats.nb_recv++;
54
55
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
56
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
57
58
/* Display how long it took */
59
if (ts.tv_nsec > sess_data->ts.tv_nsec)
60
61
ogs_assert(ret == 0);
62
63
/* Increment the counter */
64
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
65
- ogs_diam_logger_self()->stats.nb_sent++;
66
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
67
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
68
+ ogs_diam_stats_self()->stats.nb_sent++;
69
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
70
}
71
72
/* Callback for incoming Multimedia-Auth-Answer messages */
73
74
ogs_assert(err && !exp_err && result_code == ER_DIAMETER_SUCCESS);
75
76
/* Free the message */
77
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
78
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
79
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
80
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
81
- if (ogs_diam_logger_self()->stats.nb_recv) {
82
+ if (ogs_diam_stats_self()->stats.nb_recv) {
83
/* Ponderate in the avg */
84
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
85
- ogs_diam_logger_self()->stats.nb_recv + dur) /
86
- (ogs_diam_logger_self()->stats.nb_recv + 1);
87
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
88
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
89
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
90
/* Min, max */
91
- if (dur < ogs_diam_logger_self()->stats.shortest)
92
- ogs_diam_logger_self()->stats.shortest = dur;
93
- if (dur > ogs_diam_logger_self()->stats.longest)
94
- ogs_diam_logger_self()->stats.longest = dur;
95
+ if (dur < ogs_diam_stats_self()->stats.shortest)
96
+ ogs_diam_stats_self()->stats.shortest = dur;
97
+ if (dur > ogs_diam_stats_self()->stats.longest)
98
+ ogs_diam_stats_self()->stats.longest = dur;
99
} else {
100
- ogs_diam_logger_self()->stats.shortest = dur;
101
- ogs_diam_logger_self()->stats.longest = dur;
102
- ogs_diam_logger_self()->stats.avg = dur;
103
+ ogs_diam_stats_self()->stats.shortest = dur;
104
+ ogs_diam_stats_self()->stats.longest = dur;
105
+ ogs_diam_stats_self()->stats.avg = dur;
106
}
107
if (error)
108
- ogs_diam_logger_self()->stats.nb_errs++;
109
+ ogs_diam_stats_self()->stats.nb_errs++;
110
else
111
- ogs_diam_logger_self()->stats.nb_recv++;
112
+ ogs_diam_stats_self()->stats.nb_recv++;
113
114
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
115
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
116
117
/* Display how long it took */
118
if (ts.tv_nsec > sess_data->ts.tv_nsec)
119
120
ogs_assert(ret == 0);
121
122
/* Increment the counter */
123
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
124
- ogs_diam_logger_self()->stats.nb_sent++;
125
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
126
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
127
+ ogs_diam_stats_self()->stats.nb_sent++;
128
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
129
}
130
131
/* Callback for incoming Server-Assignment-Answer messages */
132
133
ogs_assert(err && !exp_err && result_code == ER_DIAMETER_SUCCESS);
134
135
/* Free the message */
136
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
137
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
138
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
139
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
140
- if (ogs_diam_logger_self()->stats.nb_recv) {
141
+ if (ogs_diam_stats_self()->stats.nb_recv) {
142
/* Ponderate in the avg */
143
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
144
- ogs_diam_logger_self()->stats.nb_recv + dur) /
145
- (ogs_diam_logger_self()->stats.nb_recv + 1);
146
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
147
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
148
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
149
/* Min, max */
150
- if (dur < ogs_diam_logger_self()->stats.shortest)
151
- ogs_diam_logger_self()->stats.shortest = dur;
152
- if (dur > ogs_diam_logger_self()->stats.longest)
153
- ogs_diam_logger_self()->stats.longest = dur;
154
+ if (dur < ogs_diam_stats_self()->stats.shortest)
155
+ ogs_diam_stats_self()->stats.shortest = dur;
156
+ if (dur > ogs_diam_stats_self()->stats.longest)
157
+ ogs_diam_stats_self()->stats.longest = dur;
158
} else {
159
- ogs_diam_logger_self()->stats.shortest = dur;
160
- ogs_diam_logger_self()->stats.longest = dur;
161
- ogs_diam_logger_self()->stats.avg = dur;
162
+ ogs_diam_stats_self()->stats.shortest = dur;
163
+ ogs_diam_stats_self()->stats.longest = dur;
164
+ ogs_diam_stats_self()->stats.avg = dur;
165
}
166
if (error)
167
- ogs_diam_logger_self()->stats.nb_errs++;
168
+ ogs_diam_stats_self()->stats.nb_errs++;
169
else
170
- ogs_diam_logger_self()->stats.nb_recv++;
171
+ ogs_diam_stats_self()->stats.nb_recv++;
172
173
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
174
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
175
176
/* Display how long it took */
177
if (ts.tv_nsec > sess_data->ts.tv_nsec)
178
179
ogs_assert(ret == 0);
180
181
/* Increment the counter */
182
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
183
- ogs_diam_logger_self()->stats.nb_sent++;
184
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
185
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
186
+ ogs_diam_stats_self()->stats.nb_sent++;
187
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
188
189
ogs_free(public_identity);
190
}
191
192
ogs_assert(err && !exp_err && result_code == ER_DIAMETER_SUCCESS);
193
194
/* Free the message */
195
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
196
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
197
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
198
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
199
- if (ogs_diam_logger_self()->stats.nb_recv) {
200
+ if (ogs_diam_stats_self()->stats.nb_recv) {
201
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/volte/diameter-rx-path.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/volte/diameter-rx-path.c
Changed
158
1
2
ogs_assert(ret == 0);
3
4
/* Increment the counter */
5
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
6
- ogs_diam_logger_self()->stats.nb_sent++;
7
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
8
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
9
+ ogs_diam_stats_self()->stats.nb_sent++;
10
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
11
12
/* Free string memory */
13
ogs_free(sip_uri);
14
15
ogs_assert(ret == 0);
16
17
/* Increment the counter */
18
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
19
- ogs_diam_logger_self()->stats.nb_sent++;
20
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
21
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
22
+ ogs_diam_stats_self()->stats.nb_sent++;
23
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
24
25
/* Free string memory */
26
ogs_free(sip_uri);
27
28
ogs_assert(ret == 0);
29
30
/* Increment the counter */
31
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
32
- ogs_diam_logger_self()->stats.nb_sent++;
33
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
34
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
35
+ ogs_diam_stats_self()->stats.nb_sent++;
36
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
37
38
/* Free string memory */
39
ogs_free(sip_uri);
40
41
42
out:
43
/* Free the message */
44
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
45
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
46
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
47
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
48
- if (ogs_diam_logger_self()->stats.nb_recv) {
49
+ if (ogs_diam_stats_self()->stats.nb_recv) {
50
/* Ponderate in the avg */
51
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
52
- ogs_diam_logger_self()->stats.nb_recv + dur) /
53
- (ogs_diam_logger_self()->stats.nb_recv + 1);
54
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
55
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
56
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
57
/* Min, max */
58
- if (dur < ogs_diam_logger_self()->stats.shortest)
59
- ogs_diam_logger_self()->stats.shortest = dur;
60
- if (dur > ogs_diam_logger_self()->stats.longest)
61
- ogs_diam_logger_self()->stats.longest = dur;
62
+ if (dur < ogs_diam_stats_self()->stats.shortest)
63
+ ogs_diam_stats_self()->stats.shortest = dur;
64
+ if (dur > ogs_diam_stats_self()->stats.longest)
65
+ ogs_diam_stats_self()->stats.longest = dur;
66
} else {
67
- ogs_diam_logger_self()->stats.shortest = dur;
68
- ogs_diam_logger_self()->stats.longest = dur;
69
- ogs_diam_logger_self()->stats.avg = dur;
70
+ ogs_diam_stats_self()->stats.shortest = dur;
71
+ ogs_diam_stats_self()->stats.longest = dur;
72
+ ogs_diam_stats_self()->stats.avg = dur;
73
}
74
if (error)
75
- ogs_diam_logger_self()->stats.nb_errs++;
76
+ ogs_diam_stats_self()->stats.nb_errs++;
77
else
78
- ogs_diam_logger_self()->stats.nb_recv++;
79
+ ogs_diam_stats_self()->stats.nb_recv++;
80
81
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
82
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
83
84
/* Display how long it took */
85
if (ts.tv_nsec > sess_data->ts.tv_nsec)
86
87
ogs_assert(ret == 0);
88
89
/* Add this value to the stats */
90
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
91
- ogs_diam_logger_self()->stats.nb_echoed++;
92
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
93
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
94
+ ogs_diam_stats_self()->stats.nb_echoed++;
95
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
96
97
test_rx_send_str(sid);
98
99
100
ogs_assert(ret == 0);
101
102
/* Increment the counter */
103
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
104
- ogs_diam_logger_self()->stats.nb_sent++;
105
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
106
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
107
+ ogs_diam_stats_self()->stats.nb_sent++;
108
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
109
}
110
111
static void pcscf_rx_sta_cb(void *data, struct msg **msg)
112
113
114
out:
115
/* Free the message */
116
- ogs_assert(pthread_mutex_lock(&ogs_diam_logger_self()->stats_lock) == 0);
117
+ ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
118
dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
119
((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
120
- if (ogs_diam_logger_self()->stats.nb_recv) {
121
+ if (ogs_diam_stats_self()->stats.nb_recv) {
122
/* Ponderate in the avg */
123
- ogs_diam_logger_self()->stats.avg = (ogs_diam_logger_self()->stats.avg *
124
- ogs_diam_logger_self()->stats.nb_recv + dur) /
125
- (ogs_diam_logger_self()->stats.nb_recv + 1);
126
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
127
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
128
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
129
/* Min, max */
130
- if (dur < ogs_diam_logger_self()->stats.shortest)
131
- ogs_diam_logger_self()->stats.shortest = dur;
132
- if (dur > ogs_diam_logger_self()->stats.longest)
133
- ogs_diam_logger_self()->stats.longest = dur;
134
+ if (dur < ogs_diam_stats_self()->stats.shortest)
135
+ ogs_diam_stats_self()->stats.shortest = dur;
136
+ if (dur > ogs_diam_stats_self()->stats.longest)
137
+ ogs_diam_stats_self()->stats.longest = dur;
138
} else {
139
- ogs_diam_logger_self()->stats.shortest = dur;
140
- ogs_diam_logger_self()->stats.longest = dur;
141
- ogs_diam_logger_self()->stats.avg = dur;
142
+ ogs_diam_stats_self()->stats.shortest = dur;
143
+ ogs_diam_stats_self()->stats.longest = dur;
144
+ ogs_diam_stats_self()->stats.avg = dur;
145
}
146
if (error)
147
- ogs_diam_logger_self()->stats.nb_errs++;
148
+ ogs_diam_stats_self()->stats.nb_errs++;
149
else
150
- ogs_diam_logger_self()->stats.nb_recv++;
151
+ ogs_diam_stats_self()->stats.nb_recv++;
152
153
- ogs_assert(pthread_mutex_unlock(&ogs_diam_logger_self()->stats_lock) == 0);
154
+ ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
155
156
/* Display how long it took */
157
if (ts.tv_nsec > sess_data->ts.tv_nsec)
158
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/vonr/af-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/vonr/af-test.c
Changed
73
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
20
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
21
22
/* gNB connects to AMF */
23
- ngap = testngap_client(AF_INET);
24
+ ngap = testngap_client(1, AF_INET);
25
ABTS_PTR_NOTNULL(tc, ngap);
26
27
/* gNB connects to UPF */
28
29
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
30
31
/* gNB connects to AMF */
32
- ngap = testngap_client(AF_INET);
33
+ ngap = testngap_client(1, AF_INET);
34
ABTS_PTR_NOTNULL(tc, ngap);
35
36
/* gNB connects to UPF */
37
38
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
39
40
/* gNB connects to AMF */
41
- ngap = testngap_client(AF_INET);
42
+ ngap = testngap_client(1, AF_INET);
43
ABTS_PTR_NOTNULL(tc, ngap);
44
45
/* gNB connects to UPF */
46
47
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
48
49
/* gNB connects to AMF */
50
- ngap = testngap_client(AF_INET);
51
+ ngap = testngap_client(1, AF_INET);
52
ABTS_PTR_NOTNULL(tc, ngap);
53
54
/* gNB connects to UPF */
55
56
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
57
58
/* gNB connects to AMF */
59
- ngap = testngap_client(AF_INET);
60
+ ngap = testngap_client(1, AF_INET);
61
ABTS_PTR_NOTNULL(tc, ngap);
62
63
/* gNB connects to UPF */
64
65
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
66
67
/* gNB connects to AMF */
68
- ngap = testngap_client(AF_INET);
69
+ ngap = testngap_client(1, AF_INET);
70
ABTS_PTR_NOTNULL(tc, ngap);
71
72
/* gNB connects to UPF */
73
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/vonr/qos-flow-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/vonr/qos-flow-test.c
Changed
19
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/vonr/session-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/vonr/session-test.c
Changed
64
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
11
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
12
13
/* gNB connects to AMF */
14
- ngap = testngap_client(AF_INET);
15
+ ngap = testngap_client(1, AF_INET);
16
ABTS_PTR_NOTNULL(tc, ngap);
17
18
/* gNB connects to UPF */
19
20
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
21
22
/* gNB connects to AMF */
23
- ngap = testngap_client(AF_INET);
24
+ ngap = testngap_client(1, AF_INET);
25
ABTS_PTR_NOTNULL(tc, ngap);
26
27
/* gNB connects to UPF */
28
29
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
30
31
/* gNB connects to AMF */
32
- ngap = testngap_client(AF_INET);
33
+ ngap = testngap_client(1, AF_INET);
34
ABTS_PTR_NOTNULL(tc, ngap);
35
36
/* gNB connects to UPF */
37
38
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
39
40
/* gNB connects to AMF */
41
- ngap = testngap_client(AF_INET);
42
+ ngap = testngap_client(1, AF_INET);
43
ABTS_PTR_NOTNULL(tc, ngap);
44
45
/* gNB connects to UPF */
46
47
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
48
49
/* gNB connects to AMF */
50
- ngap = testngap_client(AF_INET);
51
+ ngap = testngap_client(1, AF_INET);
52
ABTS_PTR_NOTNULL(tc, ngap);
53
54
/* gNB connects to UPF */
55
56
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
57
58
/* gNB connects to AMF */
59
- ngap = testngap_client(AF_INET);
60
+ ngap = testngap_client(1, AF_INET);
61
ABTS_PTR_NOTNULL(tc, ngap);
62
63
/* gNB connects to UPF */
64
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/vonr/simple-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/vonr/simple-test.c
Changed
10
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10
open5gs_2.7.2.4491.deef.202409022026.tar.xz/tests/vonr/video-test.c -> open5gs_2.7.2.4505.4308.202409032026.tar.xz/tests/vonr/video-test.c
Changed
10
1
2
test_ue->opc_string = "e8ed289deba952e4283b54e88e6183ca";
3
4
/* gNB connects to AMF */
5
- ngap = testngap_client(AF_INET);
6
+ ngap = testngap_client(1, AF_INET);
7
ABTS_PTR_NOTNULL(tc, ngap);
8
9
/* gNB connects to UPF */
10