Changes of Revision 210
commit_01d3db4b6ec9f54f4808d19572f2b20ca8d2df00.txt
Added
commit_de7e0d3b458883e8e833ec8f2f0ce57b4b889deb.txt
Deleted
open5gs_2.6.2.9.de7e0.dsc -> open5gs_2.6.2.10.01d3.dsc
Changed
x
1
2
Source: open5gs
3
Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg
4
Architecture: any
5
-Version: 2.6.2.9.de7e0
6
+Version: 2.6.2.10.01d3
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
- 3bd7b3c08a0f0a9e39ac634e1d0f62e752f1e448 14115864 open5gs_2.6.2.9.de7e0.tar.xz
15
+ 656fecea631005180ad692febc38c484619d4636 14115764 open5gs_2.6.2.10.01d3.tar.xz
16
Checksums-Sha256:
17
- f771a331f9c3a2508783191316e7cb4edceb55876cbde61865b695a3725e6a74 14115864 open5gs_2.6.2.9.de7e0.tar.xz
18
+ a933053227fbb656fe1ca986c3db5561bc7a406d5481f8513d5a6596a679193d 14115764 open5gs_2.6.2.10.01d3.tar.xz
19
Files:
20
- 2715e5481cd7a80ccaa003ce5d5c42cc 14115864 open5gs_2.6.2.9.de7e0.tar.xz
21
+ 7c59a177cf1922d336282f32eb3c3032 14115764 open5gs_2.6.2.10.01d3.tar.xz
22
open5gs_2.6.2.9.de7e0.tar.xz/.tarball-version -> open5gs_2.6.2.10.01d3.tar.xz/.tarball-version
Changed
4
1
2
-2.6.2.9-de7e0
3
+2.6.2.10-01d3
4
open5gs_2.6.2.9.de7e0.tar.xz/debian/changelog -> open5gs_2.6.2.10.01d3.tar.xz/debian/changelog
Changed
12
1
2
-open5gs (2.6.2.9.de7e0) unstable; urgency=medium
3
+open5gs (2.6.2.10.01d3) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom master feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Fri, 21 Apr 2023 13:48:09 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Fri, 21 Apr 2023 15:10:51 +0000
9
10
open5gs (2.6.2) unstable; urgency=medium
11
12
open5gs_2.6.2.9.de7e0.tar.xz/docs/_pages/docs.md -> open5gs_2.6.2.10.01d3.tar.xz/docs/_pages/docs.md
Changed
9
1
2
- @infinitydon
3
- Open5GS on Amazon Elastic Kubernetes Service(https://aws.amazon.com/blogs/opensource/open-source-mobile-core-network-implementation-on-amazon-elastic-kubernetes-service/)
4
- Kubernetes Open5GS Deployment(https://dev.to/infinitydon/virtual-4g-simulation-using-kubernetes-and-gns3-3b7k?fbclid=IwAR1p99h13a-mCfejanbBQe0H0-jp5grXkn5mWf1WrTHf47UtegB2-UHGGZQ)
5
+ - 5G Core SBI mTLS Using External Certificate PKI(https://futuredon.medium.com/5g-core-sbi-mtls-using-external-certificate-pki-4ffc02ac7728)
6
7
- @nickvsnetworking
8
- My first 5G Core : Open5GS and UERANSIM(http://nickvsnetworking.com/my-first-5g-core-open5gs-and-ueransim/)
9
open5gs_2.6.2.9.de7e0.tar.xz/lib/proto/types.h -> open5gs_2.6.2.10.01d3.tar.xz/lib/proto/types.h
Changed
9
1
2
#define OGS_MAX_DNN_LEN 100
3
#define OGS_MAX_APN_LEN OGS_MAX_DNN_LEN
4
#define OGS_MAX_PCO_LEN 251
5
+#define OGS_MAX_EPCO_LEN 65535
6
#define OGS_MAX_FQDN_LEN 256
7
8
#define OGS_MAX_NUM_OF_SERVED_GUAMI 8
9
open5gs_2.6.2.9.de7e0.tar.xz/src/amf/context.c -> open5gs_2.6.2.10.01d3.tar.xz/src/amf/context.c
Changed
11
1
2
if (sess->nssf.nrf.client)
3
ogs_sbi_client_remove(sess->nssf.nrf.client);
4
5
- OGS_NAS_CLEAR_DATA(&sess->ue_pco);
6
- OGS_TLV_CLEAR_DATA(&sess->pgw_pco);
7
-
8
ogs_pool_free(&amf_sess_pool, sess);
9
10
stats_remove_amf_session();
11
open5gs_2.6.2.9.de7e0.tar.xz/src/amf/context.h -> open5gs_2.6.2.10.01d3.tar.xz/src/amf/context.h
Changed
17
1
2
ogs_s_nssai_t mapped_hplmn;
3
char *dnn;
4
5
- /* Save Protocol Configuration Options from UE */
6
- struct {
7
- uint8_t length;
8
- uint8_t *buffer;
9
- } ue_pco;
10
-
11
- /* Save Protocol Configuration Options from PGW */
12
- ogs_tlv_octet_t pgw_pco;
13
-
14
} amf_sess_t;
15
16
void amf_context_init(void);
17
open5gs_2.6.2.9.de7e0.tar.xz/src/mme/esm-build.c -> open5gs_2.6.2.10.01d3.tar.xz/src/mme/esm-build.c
Changed
44
1
2
/*
3
- * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
apn_ambr_build(apn_ambr, session->ambr.downlink, session->ambr.uplink);
10
}
11
12
- if (sess->pgw_pco.presence && sess->pgw_pco.len && sess->pgw_pco.data) {
13
- if (mme_ue->ue_network_capability.
14
- extended_protocol_configuration_options) {
15
- activate_default_eps_bearer_context_request->presencemask |=
16
- OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
17
- extended_protocol_configuration_options->length = sess->pgw_pco.len;
18
- extended_protocol_configuration_options->buffer =
19
- sess->pgw_pco.data;
20
- } else {
21
- activate_default_eps_bearer_context_request->presencemask |=
22
- OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
23
- protocol_configuration_options->length = sess->pgw_pco.len;
24
- memcpy(protocol_configuration_options->buffer,
25
- sess->pgw_pco.data, protocol_configuration_options->length);
26
- }
27
+ if (sess->pgw_epco.presence && sess->pgw_epco.len && sess->pgw_epco.data) {
28
+ activate_default_eps_bearer_context_request->presencemask |=
29
+ OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
30
+ extended_protocol_configuration_options->length =
31
+ sess->pgw_epco.len;
32
+ extended_protocol_configuration_options->buffer =
33
+ sess->pgw_epco.data;
34
+ } else if (sess->pgw_pco.presence && sess->pgw_pco.len &&
35
+ sess->pgw_pco.data) {
36
+ activate_default_eps_bearer_context_request->presencemask |=
37
+ OGS_NAS_EPS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
38
+ protocol_configuration_options->length = sess->pgw_pco.len;
39
+ memcpy(protocol_configuration_options->buffer,
40
+ sess->pgw_pco.data, protocol_configuration_options->length);
41
}
42
43
if (create_action == OGS_GTP_CREATE_IN_ATTACH_REQUEST)
44
open5gs_2.6.2.9.de7e0.tar.xz/src/mme/esm-handler.c -> open5gs_2.6.2.10.01d3.tar.xz/src/mme/esm-handler.c
Changed
46
1
2
/*
3
- * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
}
10
11
if (req->presencemask &
12
+ OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) {
13
+ ogs_nas_extended_protocol_configuration_options_t
14
+ *extended_protocol_configuration_options =
15
+ &req->extended_protocol_configuration_options;
16
+
17
+ OGS_NAS_STORE_DATA(&sess->ue_epco,
18
+ extended_protocol_configuration_options);
19
+ } else if (req->presencemask &
20
OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) {
21
ogs_nas_protocol_configuration_options_t
22
- *protocol_configuration_options =
23
+ *protocol_configuration_options =
24
&req->protocol_configuration_options;
25
26
OGS_NAS_STORE_DATA(&sess->ue_pco, protocol_configuration_options);
27
28
}
29
30
if (rsp->presencemask &
31
+ OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) {
32
+ ogs_nas_extended_protocol_configuration_options_t
33
+ *extended_protocol_configuration_options =
34
+ &rsp->extended_protocol_configuration_options;
35
+
36
+ OGS_NAS_STORE_DATA(&sess->ue_epco,
37
+ extended_protocol_configuration_options);
38
+ } else if (rsp->presencemask &
39
OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) {
40
ogs_nas_protocol_configuration_options_t
41
- *protocol_configuration_options =
42
+ *protocol_configuration_options =
43
&rsp->protocol_configuration_options;
44
OGS_NAS_STORE_DATA(&sess->ue_pco, protocol_configuration_options);
45
}
46
open5gs_2.6.2.9.de7e0.tar.xz/src/mme/mme-context.c -> open5gs_2.6.2.10.01d3.tar.xz/src/mme/mme-context.c
Changed
11
1
2
mme_bearer_remove_all(sess);
3
4
OGS_NAS_CLEAR_DATA(&sess->ue_pco);
5
+ OGS_NAS_CLEAR_DATA(&sess->ue_epco);
6
OGS_TLV_CLEAR_DATA(&sess->pgw_pco);
7
+ OGS_TLV_CLEAR_DATA(&sess->pgw_epco);
8
9
ogs_pool_free(&mme_sess_pool, sess);
10
11
open5gs_2.6.2.9.de7e0.tar.xz/src/mme/mme-context.h -> open5gs_2.6.2.10.01d3.tar.xz/src/mme/mme-context.h
Changed
19
1
2
uint8_t *buffer;
3
} ue_pco;
4
5
+ /* Save Extended Protocol Configuration Options from UE */
6
+ struct {
7
+ uint16_t length;
8
+ uint8_t *buffer;
9
+ } ue_epco;
10
+
11
/* Save Protocol Configuration Options from PGW */
12
ogs_tlv_octet_t pgw_pco;
13
+
14
+ /* Save Extended Protocol Configuration Options from PGW */
15
+ ogs_tlv_octet_t pgw_epco;
16
} mme_sess_t;
17
18
#define MME_HAVE_ENB_S1U_PATH(__bEARER) \
19
open5gs_2.6.2.9.de7e0.tar.xz/src/mme/mme-s11-build.c -> open5gs_2.6.2.10.01d3.tar.xz/src/mme/mme-s11-build.c
Changed
23
1
2
/*
3
- * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
req->aggregate_maximum_bit_rate.len = sizeof(ambr);
10
}
11
12
- if (sess->ue_pco.length && sess->ue_pco.buffer) {
13
+ if (sess->ue_epco.length && sess->ue_epco.buffer) {
14
+ req->extended_protocol_configuration_options.presence = 1;
15
+ req->extended_protocol_configuration_options.data =
16
+ sess->ue_epco.buffer;
17
+ req->extended_protocol_configuration_options.len =
18
+ sess->ue_epco.length;
19
+ } else if (sess->ue_pco.length && sess->ue_pco.buffer) {
20
req->protocol_configuration_options.presence = 1;
21
req->protocol_configuration_options.data = sess->ue_pco.buffer;
22
req->protocol_configuration_options.len = sess->ue_pco.length;
23
open5gs_2.6.2.9.de7e0.tar.xz/src/mme/mme-s11-handler.c -> open5gs_2.6.2.10.01d3.tar.xz/src/mme/mme-s11-handler.c
Changed
23
1
2
/*
3
- * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
rsp->pdn_address_allocation.len);
10
}
11
12
+ /* ePCO */
13
+ if (rsp->extended_protocol_configuration_options.presence) {
14
+ OGS_TLV_STORE_DATA(&sess->pgw_epco,
15
+ &rsp->extended_protocol_configuration_options);
16
+
17
/* PCO */
18
- if (rsp->protocol_configuration_options.presence) {
19
+ } else if (rsp->protocol_configuration_options.presence) {
20
OGS_TLV_STORE_DATA(&sess->pgw_pco,
21
&rsp->protocol_configuration_options);
22
}
23
open5gs_2.6.2.9.de7e0.tar.xz/src/smf/context.c -> open5gs_2.6.2.10.01d3.tar.xz/src/smf/context.c
Changed
16
1
2
ogs_fsm_fini(&sess->sm, &e);
3
4
OGS_TLV_CLEAR_DATA(&sess->gtp.ue_pco);
5
+ OGS_TLV_CLEAR_DATA(&sess->gtp.ue_epco);
6
OGS_TLV_CLEAR_DATA(&sess->gtp.user_location_information);
7
OGS_TLV_CLEAR_DATA(&sess->gtp.ue_timezone);
8
OGS_TLV_CLEAR_DATA(&sess->gtp.charging_characteristics);
9
OGS_TLV_CLEAR_DATA(&sess->gtp.v1.qos);
10
11
- OGS_NAS_CLEAR_DATA(&sess->nas.ue_pco);
12
+ OGS_NAS_CLEAR_DATA(&sess->nas.ue_epco);
13
14
for (i = 0; i < sess->policy.num_of_pcc_rule; i++)
15
OGS_PCC_RULE_FREE(&sess->policy.pcc_rulei);
16
open5gs_2.6.2.9.de7e0.tar.xz/src/smf/context.h -> open5gs_2.6.2.10.01d3.tar.xz/src/smf/context.h
Changed
18
1
2
struct {
3
uint8_t version; /* GTPC version */
4
ogs_tlv_octet_t ue_pco;
5
+ ogs_tlv_octet_t ue_epco;
6
ogs_tlv_octet_t user_location_information;
7
ogs_tlv_octet_t ue_timezone;
8
ogs_tlv_octet_t charging_characteristics;
9
10
} gy;
11
12
struct {
13
- ogs_nas_extended_protocol_configuration_options_t ue_pco;
14
+ ogs_nas_extended_protocol_configuration_options_t ue_epco;
15
} nas; /* Saved from NAS-5GS */
16
17
struct {
18
open5gs_2.6.2.9.de7e0.tar.xz/src/smf/gsm-build.c -> open5gs_2.6.2.10.01d3.tar.xz/src/smf/gsm-build.c
Changed
92
1
2
/*
3
- * Copyright (C) 2019,2020 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
ogs_nas_qos_flow_description_t
10
qos_flow_descriptionOGS_NAS_MAX_NUM_OF_QOS_FLOW_DESCRIPTION;
11
12
- uint8_t pco_bufOGS_MAX_PCO_LEN;
13
- int16_t pco_len;
14
+ uint8_t *epco_buf = NULL;
15
+ int16_t epco_len;
16
17
selected_pdu_session_type = &pdu_session_establishment_accept->
18
selected_pdu_session_type;
19
20
rv = ogs_nas_build_qos_rules(authorized_qos_rules, qos_rule, 1);
21
if (rv != OGS_OK) {
22
ogs_error("ogs_nas_build_qos_rules() failed");
23
- return NULL;
24
+ goto cleanup;
25
}
26
if (!authorized_qos_rules->length) {
27
ogs_error("No length");
28
- return NULL;
29
+ goto cleanup;
30
}
31
32
/* Session-AMBR */
33
34
pdu_address->length = OGS_NAS_PDU_ADDRESS_IPV4V6_LEN;
35
} else {
36
ogs_error("Unexpected PDN Type %u", pdu_address->pdn_type);
37
- return NULL;
38
+ goto cleanup;
39
}
40
41
/* GSM cause */
42
43
authorized_qos_flow_descriptions, qos_flow_description, 1);
44
if (rv != OGS_OK) {
45
ogs_error("ogs_nas_build_qos_flow_descriptions() failed");
46
- return NULL;
47
+ goto cleanup;
48
}
49
if (!authorized_qos_flow_descriptions->length) {
50
ogs_error("No length");
51
- return NULL;
52
+ goto cleanup;
53
}
54
55
/* Extended protocol configuration options */
56
- if (sess->nas.ue_pco.buffer && sess->nas.ue_pco.length) {
57
- pco_len = smf_pco_build(pco_buf,
58
- sess->nas.ue_pco.buffer, sess->nas.ue_pco.length);
59
- ogs_assert(pco_len > 0);
60
+ if (sess->nas.ue_epco.buffer && sess->nas.ue_epco.length) {
61
+ epco_buf = ogs_calloc(OGS_MAX_EPCO_LEN, sizeof(uint8_t));
62
+ ogs_assert(epco_buf);
63
+ epco_len = smf_pco_build(epco_buf,
64
+ sess->nas.ue_epco.buffer, sess->nas.ue_epco.length);
65
+ ogs_assert(epco_len > 0);
66
pdu_session_establishment_accept->presencemask |=
67
OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
68
- extended_protocol_configuration_options->buffer = pco_buf;
69
- extended_protocol_configuration_options->length = pco_len;
70
+ extended_protocol_configuration_options->buffer = epco_buf;
71
+ extended_protocol_configuration_options->length = epco_len;
72
}
73
74
/* DNN */
75
76
pkbuf = ogs_nas_5gs_plain_encode(&message);
77
ogs_assert(pkbuf);
78
79
- ogs_free(authorized_qos_rules->buffer);
80
- ogs_free(authorized_qos_flow_descriptions->buffer);
81
+cleanup:
82
+ if (epco_buf)
83
+ ogs_free(epco_buf);
84
+
85
+ if (authorized_qos_rules->buffer)
86
+ ogs_free(authorized_qos_rules->buffer);
87
+ if (authorized_qos_flow_descriptions->buffer)
88
+ ogs_free(authorized_qos_flow_descriptions->buffer);
89
90
return pkbuf;
91
}
92
open5gs_2.6.2.9.de7e0.tar.xz/src/smf/gsm-handler.c -> open5gs_2.6.2.10.01d3.tar.xz/src/smf/gsm-handler.c
Changed
17
1
2
/*
3
- * Copyright (C) 2019,2020 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
10
if (pdu_session_establishment_request->presencemask &
11
OGS_NAS_5GS_PDU_SESSION_ESTABLISHMENT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) {
12
- OGS_NAS_STORE_DATA(&sess->nas.ue_pco,
13
+ OGS_NAS_STORE_DATA(&sess->nas.ue_epco,
14
&pdu_session_establishment_request->
15
extended_protocol_configuration_options);
16
}
17
open5gs_2.6.2.9.de7e0.tar.xz/src/smf/s5c-build.c -> open5gs_2.6.2.10.01d3.tar.xz/src/smf/s5c-build.c
Changed
126
1
2
/*
3
- * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
int rv;
10
smf_bearer_t *bearer = NULL;
11
12
+ ogs_pkbuf_t *pkbuf = NULL;
13
+
14
ogs_gtp2_message_t gtp_message;
15
ogs_gtp2_create_session_response_t *rsp = NULL;
16
17
18
int len;
19
uint8_t pco_bufOGS_MAX_PCO_LEN;
20
int16_t pco_len;
21
+ uint8_t *epco_buf = NULL;
22
+ int16_t epco_len;
23
24
ogs_debug("SMF Create Session Response");
25
26
27
&smf_s5c_teid, &len);
28
if (rv != OGS_OK) {
29
ogs_error("ogs_gtp2_sockaddr_to_f_teid() failed");
30
- return NULL;
31
+ goto cleanup;
32
}
33
rsp->pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface.
34
presence = 1;
35
36
rsp->protocol_configuration_options.len = pco_len;
37
}
38
39
+ /* ePCO */
40
+ if (sess->gtp.ue_epco.presence &&
41
+ sess->gtp.ue_epco.len && sess->gtp.ue_epco.data) {
42
+ epco_buf = ogs_calloc(OGS_MAX_EPCO_LEN, sizeof(uint8_t));
43
+ ogs_assert(epco_buf);
44
+ epco_len = smf_pco_build(
45
+ epco_buf, sess->gtp.ue_epco.data, sess->gtp.ue_epco.len);
46
+ ogs_assert(epco_len > 0);
47
+ rsp->extended_protocol_configuration_options.presence = 1;
48
+ rsp->extended_protocol_configuration_options.data = epco_buf;
49
+ rsp->extended_protocol_configuration_options.len = epco_len;
50
+ }
51
+
52
i = 0;
53
ogs_list_for_each(&sess->bearer_list, bearer) {
54
ogs_assert(i < OGS_BEARER_PER_UE);
55
56
&pgw_s5u_teidi, &pgw_s5u_leni);
57
if (rv != OGS_OK) {
58
ogs_error("ogs_gtp2_sockaddr_to_f_teid() failed");
59
- return NULL;
60
+ goto cleanup;
61
}
62
63
switch (sess->gtp_rat_type) {
64
65
}
66
67
gtp_message.h.type = type;
68
- return ogs_gtp2_build_msg(>p_message);
69
+ pkbuf = ogs_gtp2_build_msg(>p_message);
70
+
71
+cleanup:
72
+ if (epco_buf)
73
+ ogs_free(epco_buf);
74
+
75
+ return pkbuf;
76
}
77
78
ogs_pkbuf_t *smf_s5c_build_delete_session_response(
79
uint8_t type, smf_sess_t *sess)
80
{
81
+ ogs_pkbuf_t *pkbuf = NULL;
82
+
83
ogs_gtp2_message_t gtp_message;
84
ogs_gtp2_delete_session_response_t *rsp = NULL;
85
86
ogs_gtp2_cause_t cause;
87
uint8_t pco_bufOGS_MAX_PCO_LEN;
88
int16_t pco_len;
89
+ uint8_t *epco_buf = NULL;
90
+ int16_t epco_len;
91
92
/* prepare cause */
93
memset(&cause, 0, sizeof(cause));
94
95
rsp->protocol_configuration_options.len = pco_len;
96
}
97
98
+ /* ePCO */
99
+ if (sess->gtp.ue_epco.presence &&
100
+ sess->gtp.ue_epco.len && sess->gtp.ue_epco.data) {
101
+ epco_buf = ogs_calloc(OGS_MAX_EPCO_LEN, sizeof(uint8_t));
102
+ ogs_assert(epco_buf);
103
+ epco_len = smf_pco_build(
104
+ epco_buf, sess->gtp.ue_epco.data, sess->gtp.ue_epco.len);
105
+ ogs_assert(epco_len > 0);
106
+ rsp->extended_protocol_configuration_options.presence = 1;
107
+ rsp->extended_protocol_configuration_options.data = epco_buf;
108
+ rsp->extended_protocol_configuration_options.len = epco_len;
109
+ }
110
+
111
/* Private Extension */
112
113
/* build */
114
gtp_message.h.type = type;
115
- return ogs_gtp2_build_msg(>p_message);
116
+ pkbuf = ogs_gtp2_build_msg(>p_message);
117
+
118
+cleanup:
119
+ if (epco_buf)
120
+ ogs_free(epco_buf);
121
+
122
+ return pkbuf;
123
}
124
125
ogs_pkbuf_t *smf_s5c_build_modify_bearer_response(
126
open5gs_2.6.2.9.de7e0.tar.xz/src/smf/s5c-handler.c -> open5gs_2.6.2.10.01d3.tar.xz/src/smf/s5c-handler.c
Changed
49
1
2
/*
3
- * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
sess->session.ambr.uplink = be32toh(ambr->uplink) * 1000;
10
}
11
12
+ /* ePCO */
13
+ if (req->extended_protocol_configuration_options.presence) {
14
+ OGS_TLV_STORE_DATA(&sess->gtp.ue_epco,
15
+ &req->extended_protocol_configuration_options);
16
+
17
/* PCO */
18
- if (req->protocol_configuration_options.presence) {
19
+ } else if (req->protocol_configuration_options.presence) {
20
OGS_TLV_STORE_DATA(&sess->gtp.ue_pco,
21
&req->protocol_configuration_options);
22
}
23
24
OGS_TLV_STORE_DATA(&sess->gtp.ue_pco,
25
&req->protocol_configuration_options);
26
} else {
27
- /*
28
+ /*
29
* Clear contents to reflect whether PCO IE was included or not as part
30
* of session deletion procedure
31
*/
32
OGS_TLV_CLEAR_DATA(&sess->gtp.ue_pco);
33
}
34
35
+ if (req->extended_protocol_configuration_options.presence) {
36
+ OGS_TLV_STORE_DATA(&sess->gtp.ue_epco,
37
+ &req->extended_protocol_configuration_options);
38
+ } else {
39
+ /*
40
+ * Clear contents to reflect whether PCO IE was included or not as part
41
+ * of session deletion procedure
42
+ */
43
+ OGS_TLV_CLEAR_DATA(&sess->gtp.ue_epco);
44
+ }
45
+
46
ogs_debug(" SGW_S5C_TEID0x%x SMF_N4_TEID0x%x",
47
sess->sgw_s5c_teid, sess->smf_n4_teid);
48
49
open5gs_2.6.2.9.de7e0.tar.xz/tests/attach/guti-test.c -> open5gs_2.6.2.10.01d3.tar.xz/tests/attach/guti-test.c
Changed
17
1
2
/*
3
- * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
memset(&sess->pdn_connectivity_param,
10
0, sizeof(sess->pdn_connectivity_param));
11
sess->pdn_connectivity_param.eit = 1;
12
- sess->pdn_connectivity_param.pco = 1;
13
+ sess->pdn_connectivity_param.epco = 1;
14
sess->pdn_connectivity_param.request_type =
15
OGS_NAS_EPS_REQUEST_TYPE_INITIAL;
16
esmbuf = testesm_build_pdn_connectivity_request(sess, false);
17
open5gs_2.6.2.9.de7e0.tar.xz/tests/attach/simple-test.c -> open5gs_2.6.2.10.01d3.tar.xz/tests/attach/simple-test.c
Changed
17
1
2
/*
3
- * Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
tests1ap_recv(test_ue, recvbuf);
10
11
/* Send ESM Information Response */
12
- sess->esm_information_param.pco = 1;
13
+ sess->esm_information_param.epco = 1;
14
esmbuf = testesm_build_esm_information_response(sess);
15
ABTS_PTR_NOTNULL(tc, esmbuf);
16
sendbuf = test_s1ap_build_uplink_nas_transport(test_ue, esmbuf);
17
open5gs_2.6.2.9.de7e0.tar.xz/tests/common/context.h -> open5gs_2.6.2.10.01d3.tar.xz/tests/common/context.h
Changed
23
1
2
typedef struct test_pdn_connectivity_param_s {
3
union {
4
struct {
5
- ED6(uint8_t eit:1;,
6
+ ED7(uint8_t eit:1;,
7
uint8_t eit_no_required:1;,
8
uint8_t apn:1;,
9
uint8_t pco:1;,
10
+ uint8_t epco:1;,
11
uint8_t spare:1;,
12
uint8_t request_type:3;)
13
};
14
15
union {
16
struct {
17
ED8(uint8_t pco:1;,
18
- uint8_t spare1:1;,
19
+ uint8_t epco:1;,
20
uint8_t spare2:1;,
21
uint8_t spare3:1;,
22
uint8_t spare4:1;,
23
open5gs_2.6.2.9.de7e0.tar.xz/tests/common/esm-build.c -> open5gs_2.6.2.10.01d3.tar.xz/tests/common/esm-build.c
Changed
78
1
2
/*
3
- * Copyright (C) 2019,2020 by Sukchan Lee <acetcom@gmail.com>
4
+ * Copyright (C) 2019-2023 by Sukchan Lee <acetcom@gmail.com>
5
*
6
* This file is part of Open5GS.
7
*
8
9
&pdn_connectivity_request->esm_information_transfer_flag;
10
ogs_nas_protocol_configuration_options_t *protocol_configuration_options =
11
&pdn_connectivity_request->protocol_configuration_options;
12
+ ogs_nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options =
13
+ &pdn_connectivity_request->extended_protocol_configuration_options;
14
#if 0
15
uint8_t ue_pco29 =
16
"\x80\x80\x21\x10\x01\x01\x00\x10\x81\x06\x00\x00\x00\x00"
17
18
pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
19
protocol_configuration_options->length = sizeof(ue_pco);
20
memcpy(protocol_configuration_options->buffer, ue_pco, sizeof(ue_pco));
21
+ } else if (sess->pdn_connectivity_param.epco) {
22
+ pdn_connectivity_request->presencemask |= OGS_NAS_EPS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
23
+ extended_protocol_configuration_options->length = sizeof(ue_pco);
24
+ extended_protocol_configuration_options->buffer =
25
+ ogs_calloc(sizeof(uint8_t), extended_protocol_configuration_options->length);
26
+ ogs_assert(extended_protocol_configuration_options->buffer);
27
+ memcpy(extended_protocol_configuration_options->buffer, ue_pco, sizeof(ue_pco));
28
}
29
30
if (integrity_protected)
31
- return test_nas_eps_security_encode(test_ue, &message);
32
+ pkbuf = test_nas_eps_security_encode(test_ue, &message);
33
else
34
- return ogs_nas_eps_plain_encode(&message);
35
+ pkbuf = ogs_nas_eps_plain_encode(&message);
36
+ ogs_assert(pkbuf);
37
+
38
+ if (extended_protocol_configuration_options->buffer)
39
+ ogs_free(extended_protocol_configuration_options->buffer);
40
+
41
+ return pkbuf;
42
}
43
44
ogs_pkbuf_t *testesm_build_pdn_disconnect_request(test_sess_t *sess)
45
46
&esm_information_response->access_point_name;
47
ogs_nas_protocol_configuration_options_t *protocol_configuration_options =
48
&esm_information_response->protocol_configuration_options;
49
+ ogs_nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options =
50
+ &esm_information_response->extended_protocol_configuration_options;
51
52
#if 0
53
uint8_t ue_pco29 =
54
55
esm_information_response->presencemask |= OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
56
protocol_configuration_options->length = sizeof(ue_pco);
57
memcpy(protocol_configuration_options->buffer, ue_pco, sizeof(ue_pco));
58
+ } else if (sess->esm_information_param.epco) {
59
+ esm_information_response->presencemask |= OGS_NAS_EPS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
60
+ extended_protocol_configuration_options->length = sizeof(ue_pco);
61
+ extended_protocol_configuration_options->buffer =
62
+ ogs_calloc(sizeof(uint8_t), extended_protocol_configuration_options->length);
63
+ ogs_assert(extended_protocol_configuration_options->buffer);
64
+ memcpy(extended_protocol_configuration_options->buffer, ue_pco, sizeof(ue_pco));
65
}
66
67
- return test_nas_eps_security_encode(test_ue, &message);
68
+ pkbuf = test_nas_eps_security_encode(test_ue, &message);
69
+ ogs_assert(pkbuf);
70
+
71
+ if (extended_protocol_configuration_options->buffer)
72
+ ogs_free(extended_protocol_configuration_options->buffer);
73
+
74
+ return pkbuf;
75
}
76
77
ogs_pkbuf_t *testesm_build_activate_default_eps_bearer_context_accept(
78