Changes of Revision 642
open5gs_2.7.0.115.a667.202403232026.dsc -> open5gs_2.7.0.118.390a9.202403242026.dsc
Changed
x
1
2
Source: open5gs
3
Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
4
Architecture: any
5
-Version: 2.7.0.115.a667.202403232026
6
+Version: 2.7.0.118.390a9.202403242026
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
- 867212c8f8f23e1f9662d2ab44a9033d35e71d01 14485012 open5gs_2.7.0.115.a667.202403232026.tar.xz
15
+ 4d846787bcac6196229813eb41ccfb4f6f34b8e4 14485780 open5gs_2.7.0.118.390a9.202403242026.tar.xz
16
Checksums-Sha256:
17
- f8d079bb16b2381a1f2f2a6bd17a5fb0ad3c2ff775a7ac76a1969677ae2026bd 14485012 open5gs_2.7.0.115.a667.202403232026.tar.xz
18
+ 4a75c7d2d3c632c8c300b07bd98e10b77c174943ce6f5f6496f806330587aebd 14485780 open5gs_2.7.0.118.390a9.202403242026.tar.xz
19
Files:
20
- 9c66f34d17f5374571dd701501702105 14485012 open5gs_2.7.0.115.a667.202403232026.tar.xz
21
+ 423c359c929c804799c0fd1cd1866ea3 14485780 open5gs_2.7.0.118.390a9.202403242026.tar.xz
22
open5gs_2.7.0.115.a667.202403232026.tar.xz/.tarball-version -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/.tarball-version
Changed
4
1
2
-2.7.0.115-a667.202403232026
3
+2.7.0.118-390a9.202403242026
4
open5gs_2.7.0.115.a667.202403232026.tar.xz/debian/changelog -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/debian/changelog
Changed
12
1
2
-open5gs (2.7.0.115.a667.202403232026) unstable; urgency=medium
3
+open5gs (2.7.0.118.390a9.202403242026) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom nightly feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Sat, 23 Mar 2024 20:27:39 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Sun, 24 Mar 2024 20:27:37 +0000
9
10
open5gs (2.7.0) unstable; urgency=medium
11
12
open5gs_2.7.0.115.a667.202403232026.tar.xz/docs/_docs/tutorial/01-your-first-lte.md -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/docs/_docs/tutorial/01-your-first-lte.md
Changed
10
1
2
```bash
3
$ cp srsenb/enb.conf.example srsenb/enb.conf
4
$ cp srsenb/rr.conf.example srsenb/rr.conf
5
-$ cp srsenb/drb.conf.example srsenb/drb.conf
6
+$ cp srsenb/rb.conf.example srsenb/rb.conf
7
$ cp srsenb/sib.conf.example srsenb/sib.conf
8
```
9
10
open5gs_2.7.0.115.a667.202403232026.tar.xz/lib/core/ogs-timer.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/lib/core/ogs-timer.c
Changed
10
1
2
ogs_list_add(&list, &this->lnode);
3
}
4
5
+ /* You should not perform a delete on a timer using ogs_timer_delete()
6
+ * in a callback function this->cb(). */
7
ogs_list_for_each(&list, lnode) {
8
this = ogs_rb_entry(lnode, ogs_timer_t, lnode);
9
ogs_timer_stop(this);
10
open5gs_2.7.0.115.a667.202403232026.tar.xz/lib/crypt/ecc.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/lib/crypt/ecc.c
Changed
138
1
2
3
#include <string.h>
4
5
+#include "ogs-core.h"
6
+
7
#define NUM_ECC_DIGITS (ECC_BYTES/8)
8
#define MAX_TRIES 16
9
10
11
HCRYPTPROV l_prov;
12
if(!CryptAcquireContext(&l_prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
13
{
14
+ ogs_error("CryptAcquireContext() failed");
15
return 0;
16
}
17
18
19
int l_fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC);
20
if(l_fd == -1)
21
{
22
+ ogs_error("open(/dev/urandom) failed");
23
l_fd = open("/dev/random", O_RDONLY | O_CLOEXEC);
24
if(l_fd == -1)
25
{
26
+ ogs_error("open(/dev/random) failed");
27
return 0;
28
}
29
}
30
31
if(l_read <= 0)
32
{ // read failed
33
close(l_fd);
34
+ ogs_error("read() failed");
35
return 0;
36
}
37
l_left -= l_read;
38
39
{
40
if(!getRandomNumber(l_private) || (l_tries++ >= MAX_TRIES))
41
{
42
+ ogs_error("getRandomNumber() failed %d", l_tries);
43
return 0;
44
}
45
if(vli_isZero(l_private))
46
47
return 1;
48
}
49
50
+#define CURVE_A_32 {0xFFFFFFFFFFFFFFFCull, 0x00000000FFFFFFFFull, 0x0000000000000000ull, 0xFFFFFFFF00000001ull}
51
+
52
+static int ecdh_validate_pubkey(EccPoint l_public, uint64_t l_privateNUM_ECC_DIGITS) {
53
+ uint64_t leftNUM_ECC_DIGITS;
54
+ uint64_t rightNUM_ECC_DIGITS;
55
+ uint64_t curve_aNUM_ECC_DIGITS = CURVE_A_32;
56
+ /*
57
+ * To ensure l_public is a valid point on the curve, we need to check:
58
+ * y^2 % p == (x^3 + a * x + b) % p)
59
+ */
60
+
61
+ /* Compute y^2 % p and store in `left` */
62
+ vli_modSquare_fast(left, l_public.y);
63
+
64
+ /* Compute x^3 and store in `right` */
65
+ vli_modSquare_fast(right, l_public.x);
66
+ vli_modMult_fast(right, right, l_public.x);
67
+
68
+ /* Compute a * x and store in `curve_a` */
69
+ vli_modMult_fast(curve_a, curve_a, l_public.x);
70
+ /* Store ((a * x) + b) % p in `curve_a */
71
+ vli_modAdd(curve_a, curve_a, curve_b, curve_p);
72
+
73
+ /*
74
+ * Combine x^3 and ((a * x) + b) to make (x^3 + a * x + b) % p);
75
+ * store in `right`
76
+ */
77
+ vli_modAdd(right, right, curve_a, curve_p);
78
+
79
+ int i;
80
+ for (i = 0; i < NUM_ECC_DIGITS; i++) {
81
+ if (lefti != righti) {
82
+ return 0; // y^2 % p != (x^3 + a * x + b) % p)
83
+ }
84
+ }
85
+
86
+ return 1;
87
+}
88
+
89
int ecdh_shared_secret(const uint8_t p_publicKeyECC_BYTES+1, const uint8_t p_privateKeyECC_BYTES, uint8_t p_secretECC_BYTES)
90
{
91
EccPoint l_public;
92
93
94
if(!getRandomNumber(l_random))
95
{
96
+ ogs_error("getRandomNumber() failed");
97
return 0;
98
}
99
100
ecc_point_decompress(&l_public, p_publicKey);
101
ecc_bytes2native(l_private, p_privateKey);
102
103
+ /*
104
+ * Validate received public key `p_publicKey` is a valid point
105
+ * on curve P-256
106
+ */
107
+ if (!ecdh_validate_pubkey(l_public, l_private))
108
+ {
109
+ ogs_error("ecdh_validate_pubkey() failed");
110
+ return 0;
111
+ }
112
+
113
EccPoint l_product;
114
EccPoint_mult(&l_product, &l_public, l_private, l_random);
115
116
117
{
118
if(!getRandomNumber(k) || (l_tries++ >= MAX_TRIES))
119
{
120
+ ogs_error("getRandomNumber() failed %d", l_tries);
121
return 0;
122
}
123
if(vli_isZero(k))
124
125
126
if(vli_isZero(l_r) || vli_isZero(l_s))
127
{ /* r, s must not be 0. */
128
+ ogs_error("r, s must not be 0");
129
return 0;
130
}
131
132
if(vli_cmp(curve_n, l_r) != 1 || vli_cmp(curve_n, l_s) != 1)
133
{ /* r, s must be < n. */
134
+ ogs_error("r, s must be < n");
135
return 0;
136
}
137
138
open5gs_2.7.0.115.a667.202403232026.tar.xz/lib/pfcp/context.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/lib/pfcp/context.c
Changed
13
1
2
return node;
3
}
4
5
+ogs_pfcp_node_t *ogs_pfcp_node_cycle(ogs_pfcp_node_t *node)
6
+{
7
+ return ogs_pool_cycle(&ogs_pfcp_node_pool, node);
8
+}
9
+
10
void ogs_pfcp_node_free(ogs_pfcp_node_t *node)
11
{
12
ogs_assert(node);
13
open5gs_2.7.0.115.a667.202403232026.tar.xz/lib/pfcp/context.h -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/lib/pfcp/context.h
Changed
9
1
2
int ogs_pfcp_context_parse_config(const char *local, const char *remote);
3
4
ogs_pfcp_node_t *ogs_pfcp_node_new(ogs_sockaddr_t *sa_list);
5
+ogs_pfcp_node_t *ogs_pfcp_node_cycle(ogs_pfcp_node_t *node);
6
void ogs_pfcp_node_free(ogs_pfcp_node_t *node);
7
8
ogs_pfcp_node_t *ogs_pfcp_node_add(
9
open5gs_2.7.0.115.a667.202403232026.tar.xz/lib/pfcp/xact.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/lib/pfcp/xact.c
Changed
13
1
2
return xact;
3
}
4
5
-ogs_pfcp_xact_t *ogs_pfcp_xact_cycle(ogs_pfcp_xact_t *xact)
6
-{
7
- return ogs_pool_cycle(&pool, xact);
8
-}
9
-
10
void ogs_pfcp_xact_delete_all(ogs_pfcp_node_t *node)
11
{
12
ogs_pfcp_xact_t *xact = NULL, *next_xact = NULL;
13
open5gs_2.7.0.115.a667.202403232026.tar.xz/lib/pfcp/xact.h -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/lib/pfcp/xact.h
Changed
9
1
2
3
ogs_pfcp_xact_t *ogs_pfcp_xact_local_create(ogs_pfcp_node_t *node,
4
void (*cb)(ogs_pfcp_xact_t *xact, void *data), void *data);
5
-ogs_pfcp_xact_t *ogs_pfcp_xact_cycle(ogs_pfcp_xact_t *xact);
6
void ogs_pfcp_xact_delete_all(ogs_pfcp_node_t *node);
7
8
int ogs_pfcp_xact_update_tx(ogs_pfcp_xact_t *xact,
9
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/mme/esm-handler.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/mme/esm-handler.c
Changed
23
1
2
mme_csmap_t *csmap = mme_csmap_find_by_tai(&mme_ue->tai);
3
mme_ue->csmap = csmap;
4
5
- if (csmap) {
6
- ogs_assert(OGS_OK ==
7
- sgsap_send_location_update_request(mme_ue));
8
- } else {
9
+ if (!csmap ||
10
+ mme_ue->network_access_mode ==
11
+ OGS_NETWORK_ACCESS_MODE_ONLY_PACKET ||
12
+ mme_ue->nas_eps.attach.value ==
13
+ OGS_NAS_ATTACH_TYPE_EPS_ATTACH) {
14
r = nas_eps_send_attach_accept(mme_ue);
15
ogs_expect(r == OGS_OK);
16
ogs_assert(r != OGS_ERROR);
17
+ } else {
18
+ ogs_assert(OGS_OK ==
19
+ sgsap_send_location_update_request(mme_ue));
20
}
21
} else {
22
ogs_assert(OGS_OK ==
23
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/mme/mme-s11-handler.c
Changed
28
1
2
mme_csmap_t *csmap = mme_csmap_find_by_tai(&mme_ue->tai);
3
mme_ue->csmap = csmap;
4
5
- if (csmap) {
6
- ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(
7
- session->paa.session_type));
8
- ogs_assert(OGS_OK ==
9
- sgsap_send_location_update_request(mme_ue));
10
- } else {
11
+ if (!csmap ||
12
+ mme_ue->network_access_mode ==
13
+ OGS_NETWORK_ACCESS_MODE_ONLY_PACKET ||
14
+ mme_ue->nas_eps.attach.value ==
15
+ OGS_NAS_ATTACH_TYPE_EPS_ATTACH) {
16
ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(
17
session->paa.session_type));
18
r = nas_eps_send_attach_accept(mme_ue);
19
ogs_expect(r == OGS_OK);
20
ogs_assert(r != OGS_ERROR);
21
+ } else {
22
+ ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(
23
+ session->paa.session_type));
24
+ ogs_assert(OGS_OK == sgsap_send_location_update_request(mme_ue));
25
}
26
27
} else if (create_action == OGS_GTP_CREATE_IN_TRACKING_AREA_UPDATE) {
28
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/mme/sgsap-handler.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/mme/sgsap-handler.c
Changed
14
1
2
ogs_plmn_id_hexdump(&lai->nas_plmn_id), lai->lac);
3
}
4
5
- r = nas_eps_send_attach_reject(mme_ue->enb_ue, mme_ue,
6
- emm_cause, OGS_NAS_ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED);
7
+ r = nas_eps_send_attach_accept(mme_ue);
8
ogs_expect(r == OGS_OK);
9
ogs_assert(r != OGS_ERROR);
10
- mme_send_delete_session_or_mme_ue_context_release(mme_ue);
11
12
return;
13
14
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/sgwc/pfcp-sm.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/sgwc/pfcp-sm.c
Changed
12
1
2
}
3
break;
4
case SGWC_EVT_SXA_NO_HEARTBEAT:
5
-
6
- /* 'node' context was removed in ogs_pfcp_xact_delete(xact)
7
- * So, we should not use PFCP node here */
8
-
9
ogs_warn("No Heartbeat from SGW-U %s:%d",
10
OGS_ADDR(addr, buf), OGS_PORT(addr));
11
OGS_FSM_TRAN(s, sgwc_pfcp_state_will_associate);
12
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/sgwu/pfcp-sm.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/sgwu/pfcp-sm.c
Changed
12
1
2
}
3
break;
4
case SGWU_EVT_SXA_NO_HEARTBEAT:
5
-
6
- /* 'node' context was removed in ogs_pfcp_xact_delete(xact)
7
- * So, we should not use PFCP node here */
8
-
9
ogs_warn("No Heartbeat from SGW-C %s:%d",
10
OGS_ADDR(addr, buf), OGS_PORT(addr));
11
OGS_FSM_TRAN(s, sgwu_pfcp_state_will_associate);
12
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/smf/pfcp-path.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/smf/pfcp-path.c
Changed
38
1
2
ogs_assert(xact);
3
ogs_assert(data);
4
5
- sess = data;
6
- ogs_assert(sess);
7
+ sess = smf_sess_cycle(data);
8
+ if (!sess) {
9
+ ogs_warn("Session has already been removed");
10
+ return;
11
+ }
12
smf_ue = sess->smf_ue;
13
ogs_assert(smf_ue);
14
15
16
17
ogs_free(strerror);
18
19
- smf_sess_remove(sess);
20
+ /* We mustn't remove sess here. Removing a session may delete PFCP xact
21
+ timers and we must not delete any timers from within a timer
22
+ callback. Instead, we shall emit a new event to trigger session
23
+ removal from pfcp-sm state machine. */
24
+ e = smf_event_new(SMF_EVT_N4_TIMER);
25
+ ogs_assert(e);
26
+ e->sess = sess;
27
+ e->h.timer_id = SMF_TIMER_PFCP_NO_DELETION_RESPONSE;
28
+ e->pfcp_node = sess->pfcp_node;
29
+
30
+ rv = ogs_queue_push(ogs_app()->queue, e);
31
+ if (rv != OGS_OK) {
32
+ ogs_error("ogs_queue_push() failed:%d", (int)rv);
33
+ ogs_event_free(e);
34
+ }
35
break;
36
default:
37
ogs_error("Not implemented type:%d", type);
38
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/smf/pfcp-sm.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/smf/pfcp-sm.c
Changed
81
1
2
ogs_pfcp_cp_send_association_setup_request(node, node_timeout);
3
break;
4
case SMF_TIMER_PFCP_NO_ESTABLISHMENT_RESPONSE:
5
- sess = e->sess;
6
- sess = smf_sess_cycle(sess);
7
+ sess = smf_sess_cycle(e->sess);
8
if (!sess) {
9
ogs_warn("Session has already been removed");
10
break;
11
}
12
ogs_fsm_dispatch(&sess->sm, e);
13
break;
14
+ case SMF_TIMER_PFCP_NO_DELETION_RESPONSE:
15
+ sess = smf_sess_cycle(e->sess);
16
+ if (!sess) {
17
+ ogs_warn("Session has already been removed");
18
+ break;
19
+ }
20
+ SMF_SESS_CLEAR(sess);
21
+ break;
22
default:
23
ogs_error("Unknown timer%s:%d",
24
smf_timer_get_name(e->h.timer_id), e->h.timer_id);
25
26
ogs_pfcp_send_heartbeat_request(node, node_timeout));
27
break;
28
case SMF_TIMER_PFCP_NO_ESTABLISHMENT_RESPONSE:
29
- sess = e->sess;
30
- sess = smf_sess_cycle(sess);
31
+ sess = smf_sess_cycle(e->sess);
32
if (!sess) {
33
ogs_warn("Session has already been removed");
34
break;
35
}
36
ogs_fsm_dispatch(&sess->sm, e);
37
break;
38
+ case SMF_TIMER_PFCP_NO_DELETION_RESPONSE:
39
+ sess = smf_sess_cycle(e->sess);
40
+ if (!sess) {
41
+ ogs_warn("Session has already been removed");
42
+ break;
43
+ }
44
+ SMF_SESS_CLEAR(sess);
45
+ break;
46
default:
47
ogs_error("Unknown timer%s:%d",
48
smf_timer_get_name(e->h.timer_id), e->h.timer_id);
49
50
}
51
break;
52
case SMF_EVT_N4_NO_HEARTBEAT:
53
-
54
- /* 'node' context was removed in ogs_pfcp_xact_delete(xact)
55
- * So, we should not use PFCP node here */
56
-
57
ogs_warn("No Heartbeat from UPF %s:%d",
58
OGS_ADDR(addr, buf), OGS_PORT(addr));
59
+
60
+ /*
61
+ * reselect_upf() should not be executed on node_timeout
62
+ * because the timer cannot be deleted in the timer expiration function.
63
+ *
64
+ * Note that reselct_upf contains SMF_SESS_CLEAR.
65
+ */
66
+ node = e->pfcp_node;
67
+ ogs_assert(node);
68
+ reselect_upf(node);
69
+
70
OGS_FSM_TRAN(s, smf_pfcp_state_will_associate);
71
break;
72
default:
73
74
switch (type) {
75
case OGS_PFCP_HEARTBEAT_REQUEST_TYPE:
76
ogs_assert(data);
77
- reselect_upf(data);
78
79
e = smf_event_new(SMF_EVT_N4_NO_HEARTBEAT);
80
e->pfcp_node = data;
81
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/smf/timer.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/smf/timer.c
Changed
10
1
2
return "SMF_TIMER_PFCP_NO_HEARTBEAT";
3
case SMF_TIMER_PFCP_NO_ESTABLISHMENT_RESPONSE:
4
return "SMF_TIMER_PFCP_NO_ESTABLISHMENT_RESPONSE";
5
+ case SMF_TIMER_PFCP_NO_DELETION_RESPONSE:
6
+ return "SMF_TIMER_PFCP_NO_DELETION_RESPONSE";
7
default:
8
break;
9
}
10
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/smf/timer.h -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/smf/timer.h
Changed
9
1
2
SMF_TIMER_PFCP_ASSOCIATION,
3
SMF_TIMER_PFCP_NO_HEARTBEAT,
4
SMF_TIMER_PFCP_NO_ESTABLISHMENT_RESPONSE,
5
+ SMF_TIMER_PFCP_NO_DELETION_RESPONSE,
6
7
MAX_NUM_OF_SMF_TIMER,
8
9
open5gs_2.7.0.115.a667.202403232026.tar.xz/src/upf/pfcp-sm.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/src/upf/pfcp-sm.c
Changed
12
1
2
}
3
break;
4
case UPF_EVT_N4_NO_HEARTBEAT:
5
-
6
- /* 'node' context was removed in ogs_pfcp_xact_delete(xact)
7
- * So, we should not use PFCP node here */
8
-
9
ogs_warn("No Heartbeat from SMF %s:%d",
10
OGS_ADDR(addr, buf), OGS_PORT(addr));
11
OGS_FSM_TRAN(s, upf_pfcp_state_will_associate);
12
open5gs_2.7.0.115.a667.202403232026.tar.xz/subprojects/freeDiameter/extensions/rt_default/meson.build -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/subprojects/freeDiameter/extensions/rt_default/meson.build
Changed
9
1
2
-if cc.has_function('regexec', prefix : '#include <regex.h>')
3
- conf_data = configuration_data()
4
+conf_data = configuration_data()
5
+if cc.has_header_symbol('regex.h', 'REG_STARTEND')
6
conf_data.set('HAVE_REG_STARTEND', 1)
7
endif
8
configure_file(output : 'rt_default-host.h',
9
open5gs_2.7.0.115.a667.202403232026.tar.xz/tests/csfb/mo-idle-test.c -> open5gs_2.7.0.118.390a9.202403242026.tar.xz/tests/csfb/mo-idle-test.c
Changed
87
1
2
rv = testvlr_sgsap_send(sgsap, sendbuf);
3
ABTS_INT_EQUAL(tc, OGS_OK, rv);
4
5
- /* Receive Attach Reject */
6
+ /* Receive Initial Context Setup Request +
7
+ * Attach Accept +
8
+ * Activate Default Bearer Context Request */
9
recvbuf = testenb_s1ap_read(s1ap);
10
ABTS_PTR_NOTNULL(tc, recvbuf);
11
tests1ap_recv(test_ue, recvbuf);
12
13
+ /* Send Initial Context Setup Response */
14
+ sendbuf = test_s1ap_build_initial_context_setup_response(test_ue);
15
+ ABTS_PTR_NOTNULL(tc, sendbuf);
16
+ rv = testenb_s1ap_send(s1ap, sendbuf);
17
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
18
+
19
+ /* Send Attach Complete + Activate default EPS bearer cotext accept */
20
+ test_ue->nr_cgi.cell_id = 0x1234502;
21
+ bearer = test_bearer_find_by_ue_ebi(test_ue, 5);
22
+ ogs_assert(bearer);
23
+ esmbuf = testesm_build_activate_default_eps_bearer_context_accept(
24
+ bearer, false);
25
+ ABTS_PTR_NOTNULL(tc, esmbuf);
26
+ emmbuf = testemm_build_attach_complete(test_ue, esmbuf);
27
+ ABTS_PTR_NOTNULL(tc, emmbuf);
28
+ sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
29
+ ABTS_PTR_NOTNULL(tc, sendbuf);
30
+ rv = testenb_s1ap_send(s1ap, sendbuf);
31
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
32
+
33
+ /* Receive EMM information */
34
+ recvbuf = testenb_s1ap_read(s1ap);
35
+ ABTS_PTR_NOTNULL(tc, recvbuf);
36
+ tests1ap_recv(test_ue, recvbuf);
37
+
38
+ /* Send UE Context Release Request */
39
+ sendbuf = test_s1ap_build_ue_context_release_request(test_ue,
40
+ S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_user_inactivity);
41
+ ABTS_PTR_NOTNULL(tc, sendbuf);
42
+ rv = testenb_s1ap_send(s1ap, sendbuf);
43
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
44
+
45
+ /* Receive UE Context Release Command */
46
+ recvbuf = testenb_s1ap_read(s1ap);
47
+ ABTS_PTR_NOTNULL(tc, recvbuf);
48
+ tests1ap_recv(test_ue, recvbuf);
49
+
50
+ /* Send UE Context Release Complete */
51
+ sendbuf = test_s1ap_build_ue_context_release_complete(test_ue);
52
+ ABTS_PTR_NOTNULL(tc, sendbuf);
53
+ rv = testenb_s1ap_send(s1ap, sendbuf);
54
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
55
+
56
+ /* Send Service Request */
57
+ emmbuf = testemm_build_service_request(test_ue);
58
+ ABTS_PTR_NOTNULL(tc, emmbuf);
59
+ sendbuf = test_s1ap_build_initial_ue_message(
60
+ test_ue, emmbuf, S1AP_RRC_Establishment_Cause_mo_Data, true);
61
+ ABTS_PTR_NOTNULL(tc, sendbuf);
62
+ rv = testenb_s1ap_send(s1ap, sendbuf);
63
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
64
+
65
+ /* Receive Initial Context Setup Request */
66
+ recvbuf = testenb_s1ap_read(s1ap);
67
+ ABTS_PTR_NOTNULL(tc, recvbuf);
68
+ tests1ap_recv(test_ue, recvbuf);
69
+
70
+ /* Send Initial Context Setup Response */
71
+ sendbuf = test_s1ap_build_initial_context_setup_response(test_ue);
72
+ ABTS_PTR_NOTNULL(tc, sendbuf);
73
+ rv = testenb_s1ap_send(s1ap, sendbuf);
74
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
75
+
76
+ /* Send Detach Request */
77
+ emmbuf = testemm_build_detach_request(test_ue, 1, true, true);
78
+ ABTS_PTR_NOTNULL(tc, emmbuf);
79
+ sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, emmbuf);
80
+ ABTS_PTR_NOTNULL(tc, sendbuf);
81
+ rv = testenb_s1ap_send(s1ap, sendbuf);
82
+ ABTS_INT_EQUAL(tc, OGS_OK, rv);
83
+
84
/* Receive UE Context Release Command */
85
recvbuf = testenb_s1ap_read(s1ap);
86
ABTS_PTR_NOTNULL(tc, recvbuf);
87