Compare commits
5 Commits
b2f2016a67
...
1983d9d7a7
Author | SHA1 | Date |
---|---|---|
Sukchan Lee | 1983d9d7a7 | |
Sukchan Lee | 6710c13a44 | |
Sukchan Lee | 67fd2efd76 | |
Sukchan Lee | c6c8dc1256 | |
Pau Espin | 46621538af |
|
@ -1,3 +1,33 @@
|
||||||
|
open5gs (2.4.6) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Bug Fixed
|
||||||
|
|
||||||
|
-- Sukchan Lee <acetcom@gmail.com> Tue, 17 May 2022 22:41:32 +0900
|
||||||
|
|
||||||
|
open5gs (2.4.6~jammy) jammy; urgency=medium
|
||||||
|
|
||||||
|
* Bug Fixed
|
||||||
|
|
||||||
|
-- Sukchan Lee <acetcom@gmail.com> Tue, 17 May 2022 22:40:16 +0900
|
||||||
|
|
||||||
|
open5gs (2.4.6~focal) focal; urgency=medium
|
||||||
|
|
||||||
|
* Bug Fixed
|
||||||
|
|
||||||
|
-- Sukchan Lee <acetcom@gmail.com> Tue, 17 May 2022 22:38:38 +0900
|
||||||
|
|
||||||
|
open5gs (2.4.6~bionic) bionic; urgency=medium
|
||||||
|
|
||||||
|
* Bug Fixed
|
||||||
|
|
||||||
|
-- Sukchan Lee <acetcom@gmail.com> Tue, 17 May 2022 22:37:22 +0900
|
||||||
|
|
||||||
|
open5gs (2.4.6~impish) impish; urgency=medium
|
||||||
|
|
||||||
|
* Bug Fixed
|
||||||
|
|
||||||
|
-- Sukchan Lee <acetcom@gmail.com> Tue, 17 May 2022 22:34:40 +0900
|
||||||
|
|
||||||
open5gs (2.4.5) unstable; urgency=medium
|
open5gs (2.4.5) unstable; urgency=medium
|
||||||
|
|
||||||
* GTP-1C(GGSN) provided by sysmocom
|
* GTP-1C(GGSN) provided by sysmocom
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
PACKAGE="open5gs"
|
PACKAGE="open5gs"
|
||||||
VERSION="2.4.3"
|
VERSION="2.4.6"
|
||||||
|
|
||||||
print_status() {
|
print_status() {
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -75,6 +75,10 @@ static ogs_inline void *ogs_list_prev(void *lnode)
|
||||||
for (node = ogs_list_first(list); (node); \
|
for (node = ogs_list_first(list); (node); \
|
||||||
node = ogs_list_next(node))
|
node = ogs_list_next(node))
|
||||||
|
|
||||||
|
#define ogs_list_reverse_for_each(list, node) \
|
||||||
|
for (node = ogs_list_last(list); (node); \
|
||||||
|
node = ogs_list_prev(node))
|
||||||
|
|
||||||
#define ogs_list_for_each_entry(list, node, member) \
|
#define ogs_list_for_each_entry(list, node, member) \
|
||||||
for (node = ogs_list_entry(ogs_list_first(list), typeof(*node), member); \
|
for (node = ogs_list_entry(ogs_list_first(list), typeof(*node), member); \
|
||||||
(&node->member); \
|
(&node->member); \
|
||||||
|
|
|
@ -125,9 +125,16 @@ extern struct dict_object *ogs_diam_gy_pre_emption_vulnerability;
|
||||||
extern struct dict_object *ogs_diam_gy_apn_aggregate_max_bitrate_ul;
|
extern struct dict_object *ogs_diam_gy_apn_aggregate_max_bitrate_ul;
|
||||||
extern struct dict_object *ogs_diam_gy_apn_aggregate_max_bitrate_dl;
|
extern struct dict_object *ogs_diam_gy_apn_aggregate_max_bitrate_dl;
|
||||||
extern struct dict_object *ogs_diam_gy_3gpp_rat_type;
|
extern struct dict_object *ogs_diam_gy_3gpp_rat_type;
|
||||||
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI 128
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_CGI 0
|
||||||
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_ECGI 129
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_SAI 1
|
||||||
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_ECGI 130
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_RAI 2
|
||||||
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI 128
|
||||||
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_ECGI 129
|
||||||
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_ECGI 130
|
||||||
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_ENODEB_ID 131
|
||||||
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_ENODEB_ID 132
|
||||||
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_EXT_ENODEB_ID 133
|
||||||
|
#define OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_EXT_ENODEB_ID 134
|
||||||
extern struct dict_object *ogs_diam_gy_3gpp_user_location_info;
|
extern struct dict_object *ogs_diam_gy_3gpp_user_location_info;
|
||||||
extern struct dict_object *ogs_diam_gy_called_station_id;
|
extern struct dict_object *ogs_diam_gy_called_station_id;
|
||||||
extern struct dict_object *ogs_diam_gy_3gpp_ms_timezone;
|
extern struct dict_object *ogs_diam_gy_3gpp_ms_timezone;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "ogs-gtp.h"
|
#include "ogs-gtp.h"
|
||||||
|
|
||||||
/* 8.13 Protocol Configuration Options (PCO)
|
/* 8.13 Protocol Configuration Options (PCO)
|
||||||
* 10.5.6.3 Protocol configuration options in 3GPP TS 24.008 */
|
* 10.5.6.3 Protocol configuration options in 3GPP TS 24.008 */
|
||||||
|
|
||||||
/* 8.15 Bearer Quality of Service (Bearer QoS) */
|
/* 8.15 Bearer Quality of Service (Bearer QoS) */
|
||||||
|
@ -63,7 +63,7 @@ int16_t ogs_gtp2_parse_bearer_qos(
|
||||||
size += 5;
|
size += 5;
|
||||||
|
|
||||||
ogs_assert(size == octet->len);
|
ogs_assert(size == octet->len);
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
int16_t ogs_gtp2_build_bearer_qos(ogs_tlv_octet_t *octet,
|
int16_t ogs_gtp2_build_bearer_qos(ogs_tlv_octet_t *octet,
|
||||||
|
@ -233,7 +233,7 @@ int16_t ogs_gtp2_parse_flow_qos(
|
||||||
size += 5;
|
size += 5;
|
||||||
|
|
||||||
ogs_assert(size == octet->len);
|
ogs_assert(size == octet->len);
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
int16_t ogs_gtp2_build_flow_qos(ogs_tlv_octet_t *octet,
|
int16_t ogs_gtp2_build_flow_qos(ogs_tlv_octet_t *octet,
|
||||||
|
@ -277,7 +277,7 @@ int16_t ogs_gtp2_build_flow_qos(ogs_tlv_octet_t *octet,
|
||||||
return octet->len;
|
return octet->len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 8.19 EPS Bearer Level Traffic Flow Template (Bearer TFT)
|
/* 8.19 EPS Bearer Level Traffic Flow Template (Bearer TFT)
|
||||||
* See subclause 10.5.6.12 in 3GPP TS 24.008 [13]. */
|
* See subclause 10.5.6.12 in 3GPP TS 24.008 [13]. */
|
||||||
int16_t ogs_gtp2_parse_tft(ogs_gtp2_tft_t *tft, ogs_tlv_octet_t *octet)
|
int16_t ogs_gtp2_parse_tft(ogs_gtp2_tft_t *tft, ogs_tlv_octet_t *octet)
|
||||||
{
|
{
|
||||||
|
@ -673,6 +673,16 @@ int16_t ogs_gtp2_parse_uli(ogs_gtp2_uli_t *uli, ogs_tlv_octet_t *octet)
|
||||||
uli->lai.lac = be16toh(uli->lai.lac);
|
uli->lai.lac = be16toh(uli->lai.lac);
|
||||||
size += sizeof(uli->lai);
|
size += sizeof(uli->lai);
|
||||||
}
|
}
|
||||||
|
if (uli->flags.enodeb_id) {
|
||||||
|
ogs_assert(size + sizeof(uli->enodeb_id) <= octet->len);
|
||||||
|
memcpy(&uli->enodeb_id,
|
||||||
|
(unsigned char *)octet->data + size, sizeof(uli->enodeb_id));
|
||||||
|
uli->enodeb_id.enodeb_id = be16toh(uli->enodeb_id.enodeb_id);
|
||||||
|
size += sizeof(uli->enodeb_id);
|
||||||
|
}
|
||||||
|
if (uli->flags.ext_enodeb_id) { /* TODO */
|
||||||
|
ogs_error("Extended Macro eNodeB ID in ULI not implemented! see 3GPP TS 29.274 8.21.8");
|
||||||
|
}
|
||||||
|
|
||||||
ogs_assert(size == octet->len);
|
ogs_assert(size == octet->len);
|
||||||
|
|
||||||
|
@ -714,7 +724,7 @@ int16_t ogs_gtp2_build_uli(
|
||||||
size += sizeof(target.sai);
|
size += sizeof(target.sai);
|
||||||
}
|
}
|
||||||
if (target.flags.rai) {
|
if (target.flags.rai) {
|
||||||
ogs_assert(size + sizeof(target.rai) <= data_len);
|
ogs_assert(size + sizeof(target.rai) <= data_len);
|
||||||
target.rai.lac = htobe16(target.rai.lac);
|
target.rai.lac = htobe16(target.rai.lac);
|
||||||
target.rai.rac = htobe16(target.rai.rac);
|
target.rai.rac = htobe16(target.rai.rac);
|
||||||
memcpy((unsigned char *)octet->data + size,
|
memcpy((unsigned char *)octet->data + size,
|
||||||
|
@ -742,6 +752,16 @@ int16_t ogs_gtp2_build_uli(
|
||||||
&target.lai, sizeof(target.lai));
|
&target.lai, sizeof(target.lai));
|
||||||
size += sizeof(target.lai);
|
size += sizeof(target.lai);
|
||||||
}
|
}
|
||||||
|
if (target.flags.enodeb_id) {
|
||||||
|
ogs_assert(size + sizeof(target.enodeb_id) <= data_len);
|
||||||
|
target.enodeb_id.enodeb_id = htobe16(target.enodeb_id.enodeb_id);
|
||||||
|
memcpy((unsigned char *)octet->data + size,
|
||||||
|
&target.enodeb_id, sizeof(target.enodeb_id));
|
||||||
|
size += sizeof(target.enodeb_id);
|
||||||
|
}
|
||||||
|
if (uli->flags.ext_enodeb_id) { /* TODO */
|
||||||
|
ogs_error("Extended Macro eNodeB ID in ULI not implemented! see 3GPP TS 29.274 8.21.8");
|
||||||
|
}
|
||||||
|
|
||||||
octet->len = size;
|
octet->len = size;
|
||||||
|
|
||||||
|
|
|
@ -389,15 +389,29 @@ typedef struct ogs_gtp2_uli_e_cgi_s {
|
||||||
uint32_t cell_id;
|
uint32_t cell_id;
|
||||||
} __attribute__ ((packed)) ogs_gtp2_uli_e_cgi_t;
|
} __attribute__ ((packed)) ogs_gtp2_uli_e_cgi_t;
|
||||||
|
|
||||||
|
typedef struct ogs_gtp2_uli_enodeb_id_s {
|
||||||
|
ogs_nas_plmn_id_t nas_plmn_id;
|
||||||
|
uint16_t enodeb_id;
|
||||||
|
} __attribute__ ((packed)) ogs_gtp2_uli_enodeb_id_t;
|
||||||
|
|
||||||
|
typedef struct ogs_gtp2_uli_ext_enodeb_id_s {
|
||||||
|
ogs_nas_plmn_id_t nas_plmn_id;
|
||||||
|
uint32_t enodeb_id;
|
||||||
|
} __attribute__ ((packed)) ogs_gtp2_uli_ext_enodeb_id_t;
|
||||||
|
|
||||||
typedef struct ogs_gtp2_uli_s {
|
typedef struct ogs_gtp2_uli_s {
|
||||||
struct {
|
union {
|
||||||
ED7(uint8_t spare:2;,
|
struct {
|
||||||
uint8_t lai:1;,
|
ED8(uint8_t ext_enodeb_id:1;,
|
||||||
uint8_t e_cgi:1;,
|
uint8_t enodeb_id:1;,
|
||||||
uint8_t tai:1;,
|
uint8_t lai:1;,
|
||||||
uint8_t rai:1;,
|
uint8_t e_cgi:1;,
|
||||||
uint8_t sai:1;,
|
uint8_t tai:1;,
|
||||||
uint8_t cgi:1;)
|
uint8_t rai:1;,
|
||||||
|
uint8_t sai:1;,
|
||||||
|
uint8_t cgi:1;)
|
||||||
|
};
|
||||||
|
uint8_t octet;
|
||||||
} flags;
|
} flags;
|
||||||
ogs_gtp2_uli_cgi_t cgi;
|
ogs_gtp2_uli_cgi_t cgi;
|
||||||
ogs_gtp2_uli_sai_t sai;
|
ogs_gtp2_uli_sai_t sai;
|
||||||
|
@ -405,6 +419,8 @@ typedef struct ogs_gtp2_uli_s {
|
||||||
ogs_gtp2_uli_tai_t tai;
|
ogs_gtp2_uli_tai_t tai;
|
||||||
ogs_gtp2_uli_e_cgi_t e_cgi;
|
ogs_gtp2_uli_e_cgi_t e_cgi;
|
||||||
ogs_gtp2_uli_lai_t lai;
|
ogs_gtp2_uli_lai_t lai;
|
||||||
|
ogs_gtp2_uli_enodeb_id_t enodeb_id;
|
||||||
|
ogs_gtp2_uli_ext_enodeb_id_t ext_enodeb_id;
|
||||||
} ogs_gtp2_uli_t;
|
} ogs_gtp2_uli_t;
|
||||||
|
|
||||||
int16_t ogs_gtp2_parse_uli(ogs_gtp2_uli_t *uli, ogs_tlv_octet_t *octet);
|
int16_t ogs_gtp2_parse_uli(ogs_gtp2_uli_t *uli, ogs_tlv_octet_t *octet);
|
||||||
|
|
|
@ -107,12 +107,13 @@ typedef struct ogs_pfcp_xact_s {
|
||||||
|
|
||||||
uint64_t modify_flags;
|
uint64_t modify_flags;
|
||||||
|
|
||||||
#define OGS_PFCP_DELETE_TRIGGER_UE_REQUESTED 1
|
#define OGS_PFCP_DELETE_TRIGGER_LOCAL_INITIATED 1
|
||||||
#define OGS_PFCP_DELETE_TRIGGER_PCF_INITIATED 2
|
#define OGS_PFCP_DELETE_TRIGGER_UE_REQUESTED 2
|
||||||
#define OGS_PFCP_DELETE_TRIGGER_RAN_INITIATED 3
|
#define OGS_PFCP_DELETE_TRIGGER_PCF_INITIATED 3
|
||||||
#define OGS_PFCP_DELETE_TRIGGER_SMF_INITIATED 4
|
#define OGS_PFCP_DELETE_TRIGGER_RAN_INITIATED 4
|
||||||
#define OGS_PFCP_DELETE_TRIGGER_AMF_RELEASE_SM_CONTEXT 5
|
#define OGS_PFCP_DELETE_TRIGGER_SMF_INITIATED 5
|
||||||
#define OGS_PFCP_DELETE_TRIGGER_AMF_UPDATE_SM_CONTEXT 6
|
#define OGS_PFCP_DELETE_TRIGGER_AMF_RELEASE_SM_CONTEXT 6
|
||||||
|
#define OGS_PFCP_DELETE_TRIGGER_AMF_UPDATE_SM_CONTEXT 7
|
||||||
int delete_trigger;
|
int delete_trigger;
|
||||||
|
|
||||||
ogs_list_t pdr_to_create_list;
|
ogs_list_t pdr_to_create_list;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
project('open5gs', 'c', 'cpp',
|
project('open5gs', 'c', 'cpp',
|
||||||
version : '2.4.5',
|
version : '2.4.6',
|
||||||
license : 'AGPL-3.0-or-later',
|
license : 'AGPL-3.0-or-later',
|
||||||
meson_version : '>= 0.43.0',
|
meson_version : '>= 0.43.0',
|
||||||
default_options : [
|
default_options : [
|
||||||
|
@ -24,7 +24,7 @@ project('open5gs', 'c', 'cpp',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
libogslib_version = '2.4.5'
|
libogslib_version = '2.4.6'
|
||||||
|
|
||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
bindir = join_paths(prefix, get_option('bindir'))
|
bindir = join_paths(prefix, get_option('bindir'))
|
||||||
|
|
|
@ -44,8 +44,10 @@ void sgwu_context_init(void)
|
||||||
ogs_list_init(&self.sess_list);
|
ogs_list_init(&self.sess_list);
|
||||||
ogs_pool_init(&sgwu_sess_pool, ogs_app()->pool.sess);
|
ogs_pool_init(&sgwu_sess_pool, ogs_app()->pool.sess);
|
||||||
|
|
||||||
self.sess_hash = ogs_hash_make();
|
self.seid_hash = ogs_hash_make();
|
||||||
ogs_assert(self.sess_hash);
|
ogs_assert(self.seid_hash);
|
||||||
|
self.f_seid_hash = ogs_hash_make();
|
||||||
|
ogs_assert(self.f_seid_hash);
|
||||||
|
|
||||||
context_initialized = 1;
|
context_initialized = 1;
|
||||||
}
|
}
|
||||||
|
@ -56,8 +58,10 @@ void sgwu_context_final(void)
|
||||||
|
|
||||||
sgwu_sess_remove_all();
|
sgwu_sess_remove_all();
|
||||||
|
|
||||||
ogs_assert(self.sess_hash);
|
ogs_assert(self.seid_hash);
|
||||||
ogs_hash_destroy(self.sess_hash);
|
ogs_hash_destroy(self.seid_hash);
|
||||||
|
ogs_assert(self.f_seid_hash);
|
||||||
|
ogs_hash_destroy(self.f_seid_hash);
|
||||||
|
|
||||||
ogs_pool_final(&sgwu_sess_pool);
|
ogs_pool_final(&sgwu_sess_pool);
|
||||||
|
|
||||||
|
@ -137,12 +141,21 @@ sgwu_sess_t *sgwu_sess_add(ogs_pfcp_f_seid_t *cp_f_seid)
|
||||||
ogs_assert(sess->index > 0 && sess->index <= ogs_app()->pool.sess);
|
ogs_assert(sess->index > 0 && sess->index <= ogs_app()->pool.sess);
|
||||||
|
|
||||||
sess->sgwu_sxa_seid = sess->index;
|
sess->sgwu_sxa_seid = sess->index;
|
||||||
sess->sgwc_sxa_seid = cp_f_seid->seid;
|
|
||||||
ogs_hash_set(self.sess_hash, &sess->sgwc_sxa_seid,
|
/* Since F-SEID is composed of ogs_ip_t and uint64-seid,
|
||||||
sizeof(sess->sgwc_sxa_seid), sess);
|
* all these values must be put into the structure-sgwc_sxa_f_eid
|
||||||
|
* before creating hash */
|
||||||
|
sess->sgwc_sxa_f_seid.seid = cp_f_seid->seid;
|
||||||
|
ogs_assert(OGS_OK ==
|
||||||
|
ogs_pfcp_f_seid_to_ip(cp_f_seid, &sess->sgwc_sxa_f_seid.ip));
|
||||||
|
|
||||||
|
ogs_hash_set(self.f_seid_hash, &sess->sgwc_sxa_f_seid,
|
||||||
|
sizeof(sess->sgwc_sxa_f_seid), sess);
|
||||||
|
ogs_hash_set(self.seid_hash, &sess->sgwc_sxa_f_seid.seid,
|
||||||
|
sizeof(sess->sgwc_sxa_f_seid.seid), sess);
|
||||||
|
|
||||||
ogs_info("UE F-SEID[CP:0x%lx UP:0x%lx]",
|
ogs_info("UE F-SEID[CP:0x%lx UP:0x%lx]",
|
||||||
(long)sess->sgwu_sxa_seid, (long)sess->sgwc_sxa_seid);
|
(long)sess->sgwu_sxa_seid, (long)sess->sgwc_sxa_f_seid.seid);
|
||||||
|
|
||||||
ogs_list_add(&self.sess_list, sess);
|
ogs_list_add(&self.sess_list, sess);
|
||||||
|
|
||||||
|
@ -159,8 +172,10 @@ int sgwu_sess_remove(sgwu_sess_t *sess)
|
||||||
ogs_list_remove(&self.sess_list, sess);
|
ogs_list_remove(&self.sess_list, sess);
|
||||||
ogs_pfcp_sess_clear(&sess->pfcp);
|
ogs_pfcp_sess_clear(&sess->pfcp);
|
||||||
|
|
||||||
ogs_hash_set(self.sess_hash, &sess->sgwc_sxa_seid,
|
ogs_hash_set(self.seid_hash, &sess->sgwc_sxa_f_seid.seid,
|
||||||
sizeof(sess->sgwc_sxa_seid), NULL);
|
sizeof(sess->sgwc_sxa_f_seid.seid), NULL);
|
||||||
|
ogs_hash_set(self.f_seid_hash, &sess->sgwc_sxa_f_seid,
|
||||||
|
sizeof(sess->sgwc_sxa_f_seid), NULL);
|
||||||
|
|
||||||
ogs_pfcp_pool_final(&sess->pfcp);
|
ogs_pfcp_pool_final(&sess->pfcp);
|
||||||
|
|
||||||
|
@ -186,12 +201,26 @@ sgwu_sess_t *sgwu_sess_find(uint32_t index)
|
||||||
return ogs_pool_find(&sgwu_sess_pool, index);
|
return ogs_pool_find(&sgwu_sess_pool, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
sgwu_sess_t *sgwu_sess_find_by_cp_seid(uint64_t seid)
|
sgwu_sess_t *sgwu_sess_find_by_sgwc_sxa_seid(uint64_t seid)
|
||||||
{
|
{
|
||||||
return (sgwu_sess_t *)ogs_hash_get(self.sess_hash, &seid, sizeof(seid));
|
return (sgwu_sess_t *)ogs_hash_get(self.seid_hash, &seid, sizeof(seid));
|
||||||
}
|
}
|
||||||
|
|
||||||
sgwu_sess_t *sgwu_sess_find_by_up_seid(uint64_t seid)
|
sgwu_sess_t *sgwu_sess_find_by_sgwc_sxa_f_seid(ogs_pfcp_f_seid_t *f_seid)
|
||||||
|
{
|
||||||
|
struct {
|
||||||
|
uint64_t seid;
|
||||||
|
ogs_ip_t ip;
|
||||||
|
} key;
|
||||||
|
|
||||||
|
ogs_assert(f_seid);
|
||||||
|
ogs_assert(OGS_OK == ogs_pfcp_f_seid_to_ip(f_seid, &key.ip));
|
||||||
|
key.seid = f_seid->seid;
|
||||||
|
|
||||||
|
return (sgwu_sess_t *)ogs_hash_get(self.f_seid_hash, &key, sizeof(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
sgwu_sess_t *sgwu_sess_find_by_sgwu_sxa_seid(uint64_t seid)
|
||||||
{
|
{
|
||||||
return sgwu_sess_find(seid);
|
return sgwu_sess_find(seid);
|
||||||
}
|
}
|
||||||
|
@ -212,7 +241,7 @@ sgwu_sess_t *sgwu_sess_add_by_message(ogs_pfcp_message_t *message)
|
||||||
}
|
}
|
||||||
f_seid->seid = be64toh(f_seid->seid);
|
f_seid->seid = be64toh(f_seid->seid);
|
||||||
|
|
||||||
sess = sgwu_sess_find_by_cp_seid(f_seid->seid);
|
sess = sgwu_sess_find_by_sgwc_sxa_f_seid(f_seid);
|
||||||
if (!sess) {
|
if (!sess) {
|
||||||
sess = sgwu_sess_add(f_seid);
|
sess = sgwu_sess_add(f_seid);
|
||||||
if (!sess) return NULL;
|
if (!sess) return NULL;
|
||||||
|
|
|
@ -37,7 +37,9 @@ extern int __sgwu_log_domain;
|
||||||
#define OGS_LOG_DOMAIN __sgwu_log_domain
|
#define OGS_LOG_DOMAIN __sgwu_log_domain
|
||||||
|
|
||||||
typedef struct sgwu_context_s {
|
typedef struct sgwu_context_s {
|
||||||
ogs_hash_t *sess_hash; /* hash table (F-SEID) */
|
ogs_hash_t *seid_hash; /* hash table (SEID) */
|
||||||
|
ogs_hash_t *f_seid_hash; /* hash table (F-SEID) */
|
||||||
|
|
||||||
ogs_list_t sess_list;
|
ogs_list_t sess_list;
|
||||||
} sgwu_context_t;
|
} sgwu_context_t;
|
||||||
|
|
||||||
|
@ -49,7 +51,10 @@ typedef struct sgwu_sess_s {
|
||||||
ogs_pfcp_sess_t pfcp;
|
ogs_pfcp_sess_t pfcp;
|
||||||
|
|
||||||
uint64_t sgwu_sxa_seid; /* SGW-U SEID is dervied from INDEX */
|
uint64_t sgwu_sxa_seid; /* SGW-U SEID is dervied from INDEX */
|
||||||
uint64_t sgwc_sxa_seid; /* SGW-C SEID is received from Peer */
|
struct {
|
||||||
|
uint64_t seid;
|
||||||
|
ogs_ip_t ip;
|
||||||
|
} sgwc_sxa_f_seid; /* SGW-C SEID is received from Peer */
|
||||||
|
|
||||||
ogs_pfcp_node_t *pfcp_node;
|
ogs_pfcp_node_t *pfcp_node;
|
||||||
} sgwu_sess_t;
|
} sgwu_sess_t;
|
||||||
|
@ -66,8 +71,9 @@ sgwu_sess_t *sgwu_sess_add(ogs_pfcp_f_seid_t *f_seid);
|
||||||
int sgwu_sess_remove(sgwu_sess_t *sess);
|
int sgwu_sess_remove(sgwu_sess_t *sess);
|
||||||
void sgwu_sess_remove_all(void);
|
void sgwu_sess_remove_all(void);
|
||||||
sgwu_sess_t *sgwu_sess_find(uint32_t index);
|
sgwu_sess_t *sgwu_sess_find(uint32_t index);
|
||||||
sgwu_sess_t *sgwu_sess_find_by_cp_seid(uint64_t seid);
|
sgwu_sess_t *sgwu_sess_find_by_sgwc_sxa_seid(uint64_t seid);
|
||||||
sgwu_sess_t *sgwu_sess_find_by_up_seid(uint64_t seid);
|
sgwu_sess_t *sgwu_sess_find_by_sgwc_sxa_f_seid(ogs_pfcp_f_seid_t *f_seid);
|
||||||
|
sgwu_sess_t *sgwu_sess_find_by_sgwu_sxa_seid(uint64_t seid);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ int sgwu_pfcp_send_session_establishment_response(
|
||||||
|
|
||||||
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
||||||
h.type = OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE;
|
h.type = OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE;
|
||||||
h.seid = sess->sgwc_sxa_seid;
|
h.seid = sess->sgwc_sxa_f_seid.seid;
|
||||||
|
|
||||||
sxabuf = sgwu_sxa_build_session_establishment_response(
|
sxabuf = sgwu_sxa_build_session_establishment_response(
|
||||||
h.type, sess, created_pdr, num_of_created_pdr);
|
h.type, sess, created_pdr, num_of_created_pdr);
|
||||||
|
@ -202,7 +202,7 @@ int sgwu_pfcp_send_session_modification_response(
|
||||||
|
|
||||||
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
||||||
h.type = OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE;
|
h.type = OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE;
|
||||||
h.seid = sess->sgwc_sxa_seid;
|
h.seid = sess->sgwc_sxa_f_seid.seid;
|
||||||
|
|
||||||
sxabuf = sgwu_sxa_build_session_modification_response(
|
sxabuf = sgwu_sxa_build_session_modification_response(
|
||||||
h.type, sess, created_pdr, num_of_created_pdr);
|
h.type, sess, created_pdr, num_of_created_pdr);
|
||||||
|
@ -228,7 +228,7 @@ int sgwu_pfcp_send_session_deletion_response(ogs_pfcp_xact_t *xact,
|
||||||
|
|
||||||
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
||||||
h.type = OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE;
|
h.type = OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE;
|
||||||
h.seid = sess->sgwc_sxa_seid;
|
h.seid = sess->sgwc_sxa_f_seid.seid;
|
||||||
|
|
||||||
sxabuf = sgwu_sxa_build_session_deletion_response(h.type, sess);
|
sxabuf = sgwu_sxa_build_session_deletion_response(h.type, sess);
|
||||||
ogs_expect_or_return_val(sxabuf, OGS_ERROR);
|
ogs_expect_or_return_val(sxabuf, OGS_ERROR);
|
||||||
|
@ -272,7 +272,7 @@ int sgwu_pfcp_send_session_report_request(
|
||||||
|
|
||||||
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
||||||
h.type = OGS_PFCP_SESSION_REPORT_REQUEST_TYPE;
|
h.type = OGS_PFCP_SESSION_REPORT_REQUEST_TYPE;
|
||||||
h.seid = sess->sgwc_sxa_seid;
|
h.seid = sess->sgwc_sxa_f_seid.seid;
|
||||||
|
|
||||||
xact = ogs_pfcp_xact_local_create(sess->pfcp_node, sess_timeout, sess);
|
xact = ogs_pfcp_xact_local_create(sess->pfcp_node, sess_timeout, sess);
|
||||||
ogs_expect_or_return_val(xact, OGS_ERROR);
|
ogs_expect_or_return_val(xact, OGS_ERROR);
|
||||||
|
|
|
@ -180,7 +180,7 @@ void sgwu_pfcp_state_associated(ogs_fsm_t *s, sgwu_event_t *e)
|
||||||
ogs_assert(xact);
|
ogs_assert(xact);
|
||||||
|
|
||||||
if (message->h.seid_presence && message->h.seid != 0)
|
if (message->h.seid_presence && message->h.seid != 0)
|
||||||
sess = sgwu_sess_find_by_up_seid(message->h.seid);
|
sess = sgwu_sess_find_by_sgwu_sxa_seid(message->h.seid);
|
||||||
|
|
||||||
switch (message->h.type) {
|
switch (message->h.type) {
|
||||||
case OGS_PFCP_HEARTBEAT_REQUEST_TYPE:
|
case OGS_PFCP_HEARTBEAT_REQUEST_TYPE:
|
||||||
|
|
|
@ -47,7 +47,7 @@ static void gtp_bearer_timeout(ogs_gtp_xact_t *xact, void *data)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
@ -325,7 +325,7 @@ void smf_bearer_binding(smf_sess_t *sess)
|
||||||
smf_bearer_qos_update(bearer);
|
smf_bearer_qos_update(bearer);
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, OGS_PFCP_MODIFY_CREATE,
|
bearer, NULL, OGS_PFCP_MODIFY_CREATE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
@ -383,7 +383,7 @@ void smf_bearer_binding(smf_sess_t *sess)
|
||||||
* forwarding downlink packets for the affected bearer(s).
|
* forwarding downlink packets for the affected bearer(s).
|
||||||
*/
|
*/
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL,
|
bearer, NULL,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE,
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
|
@ -665,7 +665,7 @@ void smf_qos_flow_binding(smf_sess_t *sess)
|
||||||
|
|
||||||
if (ogs_list_count(&sess->qos_flow_to_modify_list)) {
|
if (ogs_list_count(&sess->qos_flow_to_modify_list)) {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_session_modification_request(
|
smf_5gc_pfcp_send_qos_flow_list_modification_request(
|
||||||
sess, NULL, pfcp_flags, 0));
|
sess, NULL, pfcp_flags, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
|
#include "pfcp-path.h"
|
||||||
|
|
||||||
static smf_context_t self;
|
static smf_context_t self;
|
||||||
static ogs_diam_config_t g_diam_conf;
|
static ogs_diam_config_t g_diam_conf;
|
||||||
|
@ -1138,7 +1139,7 @@ smf_sess_t *smf_sess_add_by_gtp1_message(ogs_gtp1_message_t *message)
|
||||||
|
|
||||||
sess = smf_sess_find_by_apn(smf_ue, apn, req->rat_type.u8);
|
sess = smf_sess_find_by_apn(smf_ue, apn, req->rat_type.u8);
|
||||||
if (sess) {
|
if (sess) {
|
||||||
ogs_warn("OLD Session Release [IMSI:%s,APN:%s]",
|
ogs_warn("OLD Session Will Release [IMSI:%s,APN:%s]",
|
||||||
smf_ue->imsi_bcd, sess->session.name);
|
smf_ue->imsi_bcd, sess->session.name);
|
||||||
smf_sess_remove(sess);
|
smf_sess_remove(sess);
|
||||||
}
|
}
|
||||||
|
@ -1202,7 +1203,7 @@ smf_sess_t *smf_sess_add_by_gtp2_message(ogs_gtp2_message_t *message)
|
||||||
|
|
||||||
sess = smf_sess_find_by_apn(smf_ue, apn, req->rat_type.u8);
|
sess = smf_sess_find_by_apn(smf_ue, apn, req->rat_type.u8);
|
||||||
if (sess) {
|
if (sess) {
|
||||||
ogs_info("OLD Session Release [IMSI:%s,APN:%s]",
|
ogs_info("OLD Session Will Release [IMSI:%s,APN:%s]",
|
||||||
smf_ue->imsi_bcd, sess->session.name);
|
smf_ue->imsi_bcd, sess->session.name);
|
||||||
smf_sess_remove(sess);
|
smf_sess_remove(sess);
|
||||||
}
|
}
|
||||||
|
@ -1308,7 +1309,7 @@ smf_sess_t *smf_sess_add_by_sbi_message(ogs_sbi_message_t *message)
|
||||||
|
|
||||||
sess = smf_sess_find_by_psi(smf_ue, SmContextCreateData->pdu_session_id);
|
sess = smf_sess_find_by_psi(smf_ue, SmContextCreateData->pdu_session_id);
|
||||||
if (sess) {
|
if (sess) {
|
||||||
ogs_warn("OLD Session Release [SUPI:%s,PDU Session identity:%d]",
|
ogs_warn("OLD Session Will Release [SUPI:%s,PDU Session identity:%d]",
|
||||||
SmContextCreateData->supi, SmContextCreateData->pdu_session_id);
|
SmContextCreateData->supi, SmContextCreateData->pdu_session_id);
|
||||||
smf_sess_remove(sess);
|
smf_sess_remove(sess);
|
||||||
}
|
}
|
||||||
|
@ -1503,7 +1504,7 @@ smf_sess_t *smf_sess_find_by_error_indication_report(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ogs_list_for_each(&smf_ue->sess_list, sess) {
|
ogs_list_reverse_for_each(&smf_ue->sess_list, sess) {
|
||||||
if (teid == sess->gnb_n3_teid) {
|
if (teid == sess->gnb_n3_teid) {
|
||||||
if (len == OGS_IPV4_LEN && sess->gnb_n3_ip.ipv4 &&
|
if (len == OGS_IPV4_LEN && sess->gnb_n3_ip.ipv4 &&
|
||||||
memcmp(addr, &sess->gnb_n3_ip.addr, len) == 0) {
|
memcmp(addr, &sess->gnb_n3_ip.addr, len) == 0) {
|
||||||
|
@ -1656,7 +1657,7 @@ smf_sess_t *smf_sess_find_by_apn(smf_ue_t *smf_ue, char *apn, uint8_t rat_type)
|
||||||
ogs_assert(smf_ue);
|
ogs_assert(smf_ue);
|
||||||
ogs_assert(apn);
|
ogs_assert(apn);
|
||||||
|
|
||||||
ogs_list_for_each(&smf_ue->sess_list, sess) {
|
ogs_list_reverse_for_each(&smf_ue->sess_list, sess) {
|
||||||
if (ogs_strcasecmp(sess->session.name, apn) == 0 &&
|
if (ogs_strcasecmp(sess->session.name, apn) == 0 &&
|
||||||
sess->gtp_rat_type == rat_type)
|
sess->gtp_rat_type == rat_type)
|
||||||
return sess;
|
return sess;
|
||||||
|
@ -1672,7 +1673,7 @@ smf_sess_t *smf_sess_find_by_psi(smf_ue_t *smf_ue, uint8_t psi)
|
||||||
ogs_assert(smf_ue);
|
ogs_assert(smf_ue);
|
||||||
ogs_assert(psi != OGS_NAS_PDU_SESSION_IDENTITY_UNASSIGNED);
|
ogs_assert(psi != OGS_NAS_PDU_SESSION_IDENTITY_UNASSIGNED);
|
||||||
|
|
||||||
ogs_list_for_each(&smf_ue->sess_list, sess) {
|
ogs_list_reverse_for_each(&smf_ue->sess_list, sess) {
|
||||||
if (sess->psi == psi)
|
if (sess->psi == psi)
|
||||||
return sess;
|
return sess;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,3 +59,89 @@ void smf_fd_final(void)
|
||||||
|
|
||||||
ogs_diam_final();
|
ogs_diam_final();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Append 3GPP-User-Location-Info, 3GPP TS 29.061 16.4.7.2 22 */
|
||||||
|
void smf_fd_msg_avp_add_3gpp_uli(smf_sess_t *sess, struct avp *avp)
|
||||||
|
{
|
||||||
|
struct avp *avpch1;
|
||||||
|
union avp_value val;
|
||||||
|
ogs_gtp2_uli_t uli;
|
||||||
|
int16_t uli_len;
|
||||||
|
uint8_t uli_buf[OGS_GTP2_MAX_ULI_LEN], reencoded_uli_buf[OGS_GTP2_MAX_ULI_LEN];
|
||||||
|
uint8_t uli_type;
|
||||||
|
int ret;
|
||||||
|
ogs_gtp2_tlv_uli_t reencoded_uli;
|
||||||
|
|
||||||
|
if (sess->gtp.user_location_information.presence == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (sess->gtp.version == 1) {
|
||||||
|
/* For GTPv1C, it's a 1-1 coding match with TS 29.060 7.7.51: */
|
||||||
|
ret = fd_msg_avp_new(
|
||||||
|
ogs_diam_gy_3gpp_user_location_info, 0, &avpch1);
|
||||||
|
ogs_assert(ret == 0);
|
||||||
|
val.os.data = sess->gtp.user_location_information.data;
|
||||||
|
val.os.len = sess->gtp.user_location_information.len;
|
||||||
|
ret = fd_msg_avp_setvalue(avpch1, &val);
|
||||||
|
ogs_assert(ret == 0);
|
||||||
|
ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avpch1);
|
||||||
|
ogs_assert(ret == 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* GTPv2C and Diameter 3GPP-User-Location-Information encoding don't match */
|
||||||
|
uli_len = ogs_gtp2_parse_uli(
|
||||||
|
&uli, &sess->gtp.user_location_information);
|
||||||
|
ogs_assert(sess->gtp.user_location_information.len == uli_len);
|
||||||
|
|
||||||
|
ogs_assert(sess->gtp.user_location_information.data);
|
||||||
|
ogs_assert(sess->gtp.user_location_information.len);
|
||||||
|
memcpy(&uli_buf, sess->gtp.user_location_information.data,
|
||||||
|
sess->gtp.user_location_information.len);
|
||||||
|
|
||||||
|
/* Update Gy ULI Type */
|
||||||
|
if (uli.flags.cgi) {
|
||||||
|
uli_type = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_CGI;
|
||||||
|
uli.flags.octet = 0; uli.flags.cgi = 1;
|
||||||
|
} else if (uli.flags.sai) {
|
||||||
|
uli_type = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_SAI;
|
||||||
|
uli.flags.octet = 0; uli.flags.sai = 1;
|
||||||
|
} else if (uli.flags.rai) {
|
||||||
|
uli_type = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_RAI;
|
||||||
|
uli.flags.octet = 0; uli.flags.rai = 1;
|
||||||
|
} else if (uli.flags.tai && uli.flags.e_cgi) {
|
||||||
|
uli_type = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_ECGI;
|
||||||
|
uli.flags.octet = 0; uli.flags.tai = 1; uli.flags.e_cgi = 1;
|
||||||
|
} else if (uli.flags.tai && uli.flags.enodeb_id) {
|
||||||
|
uli_type = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_ENODEB_ID;
|
||||||
|
uli.flags.octet = 0; uli.flags.tai = 1; uli.flags.enodeb_id = 1;
|
||||||
|
} else if (uli.flags.tai && uli.flags.ext_enodeb_id) {
|
||||||
|
uli_type = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_EXT_ENODEB_ID;
|
||||||
|
uli.flags.octet = 0; uli.flags.tai = 1; uli.flags.ext_enodeb_id = 1;
|
||||||
|
} else if (uli.flags.tai) {
|
||||||
|
uli_type = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI;
|
||||||
|
uli.flags.octet = 0; uli.flags.tai = 1;
|
||||||
|
} else if (uli.flags.e_cgi) {
|
||||||
|
uli_type = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_ECGI;
|
||||||
|
uli.flags.octet = 0; uli.flags.e_cgi = 1;
|
||||||
|
} else {
|
||||||
|
ogs_error("Unexpected ULI content, unable to convert to Diameter!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reencode ULI dropping unrelated values: */
|
||||||
|
uli_len = ogs_gtp2_build_uli(&reencoded_uli, &uli,
|
||||||
|
reencoded_uli_buf, sizeof(reencoded_uli_buf));
|
||||||
|
reencoded_uli_buf[0] = uli_type;
|
||||||
|
|
||||||
|
ret = fd_msg_avp_new(
|
||||||
|
ogs_diam_gy_3gpp_user_location_info, 0, &avpch1);
|
||||||
|
ogs_assert(ret == 0);
|
||||||
|
val.os.data = (uint8_t *)&reencoded_uli_buf;
|
||||||
|
val.os.len = uli_len;
|
||||||
|
ret = fd_msg_avp_setvalue(avpch1, &val);
|
||||||
|
ogs_assert(ret == 0);
|
||||||
|
ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avpch1);
|
||||||
|
ogs_assert(ret == 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -46,6 +46,8 @@ void smf_gy_send_ccr(smf_sess_t *sess, void *xact,
|
||||||
void smf_s6b_send_aar(smf_sess_t *sess, ogs_gtp_xact_t *xact);
|
void smf_s6b_send_aar(smf_sess_t *sess, ogs_gtp_xact_t *xact);
|
||||||
void smf_s6b_send_str(smf_sess_t *sess, ogs_gtp_xact_t *xact, uint32_t cause);
|
void smf_s6b_send_str(smf_sess_t *sess, ogs_gtp_xact_t *xact, uint32_t cause);
|
||||||
|
|
||||||
|
void smf_fd_msg_avp_add_3gpp_uli(smf_sess_t *sess, struct avp *avp);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -141,10 +141,13 @@ uint8_t smf_gn_handle_create_pdp_context_request(
|
||||||
ogs_debug(" SGW_S5C_TEID[0x%x] SMF_N4_TEID[0x%x]",
|
ogs_debug(" SGW_S5C_TEID[0x%x] SMF_N4_TEID[0x%x]",
|
||||||
sess->sgw_s5c_teid, sess->smf_n4_teid);
|
sess->sgw_s5c_teid, sess->smf_n4_teid);
|
||||||
|
|
||||||
|
/* User Location Information, TS 29.060 sec 7.7.51 */
|
||||||
|
/* Note: the IE is content is different in GTPv1C and GTPv2C */
|
||||||
|
OGS_TLV_STORE_DATA(&sess->gtp.user_location_information,
|
||||||
|
&req->user_location_information);
|
||||||
if (ogs_gtp1_parse_uli(&uli, &req->user_location_information) == 0)
|
if (ogs_gtp1_parse_uli(&uli, &req->user_location_information) == 0)
|
||||||
return OGS_GTP1_CAUSE_MANDATORY_IE_INCORRECT;
|
return OGS_GTP1_CAUSE_MANDATORY_IE_INCORRECT;
|
||||||
|
|
||||||
/* TODO: Copy uli->cgi/sai/rai into sess-> */
|
|
||||||
switch (uli.geo_loc_type) {
|
switch (uli.geo_loc_type) {
|
||||||
case OGS_GTP1_GEO_LOC_TYPE_CGI:
|
case OGS_GTP1_GEO_LOC_TYPE_CGI:
|
||||||
ogs_nas_to_plmn_id(&sess->plmn_id, &uli.cgi.nas_plmn_id);
|
ogs_nas_to_plmn_id(&sess->plmn_id, &uli.cgi.nas_plmn_id);
|
||||||
|
@ -155,6 +158,7 @@ uint8_t smf_gn_handle_create_pdp_context_request(
|
||||||
case OGS_GTP1_GEO_LOC_TYPE_RAI:
|
case OGS_GTP1_GEO_LOC_TYPE_RAI:
|
||||||
ogs_nas_to_plmn_id(&sess->plmn_id, &uli.rai.nas_plmn_id);
|
ogs_nas_to_plmn_id(&sess->plmn_id, &uli.rai.nas_plmn_id);
|
||||||
break;
|
break;
|
||||||
|
/* default: should not happen */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set MSISDN: */
|
/* Set MSISDN: */
|
||||||
|
@ -203,15 +207,6 @@ uint8_t smf_gn_handle_create_pdp_context_request(
|
||||||
&req->protocol_configuration_options);
|
&req->protocol_configuration_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Set User Location Information */
|
|
||||||
/* TODO: the IE is probably different between GTPv1C and GTPv2, see what needs to be adapted */
|
|
||||||
if (req->user_location_information.presence) {
|
|
||||||
OGS_TLV_STORE_DATA(&sess->gtp.user_location_information,
|
|
||||||
&req->user_location_information);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Set UE Timezone */
|
/* Set UE Timezone */
|
||||||
if (req->ms_time_zone.presence) {
|
if (req->ms_time_zone.presence) {
|
||||||
/* value part is compatible between UE Time Zone and MS Time Zone */
|
/* value part is compatible between UE Time Zone and MS Time Zone */
|
||||||
|
@ -418,7 +413,7 @@ void smf_gn_handle_update_pdp_context_request(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = smf_epc_pfcp_send_pdr_modification_request(sess, xact, NULL,
|
rv = smf_epc_pfcp_send_all_pdr_modification_request(sess, xact, NULL,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE,
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP1_CAUSE_REACTIACTION_REQUESTED);
|
OGS_GTP1_CAUSE_REACTIACTION_REQUESTED);
|
||||||
|
|
|
@ -520,7 +520,7 @@ int gsm_handle_pdu_session_modification_request(
|
||||||
}
|
}
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_session_modification_request(
|
smf_5gc_pfcp_send_qos_flow_list_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_UE_REQUESTED|pfcp_flags, 0));
|
OGS_PFCP_MODIFY_UE_REQUESTED|pfcp_flags, 0));
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,11 @@ static bool send_sbi_message_from_delete_trigger(
|
||||||
ogs_sbi_message_t sendmsg;
|
ogs_sbi_message_t sendmsg;
|
||||||
ogs_sbi_response_t *response = NULL;
|
ogs_sbi_response_t *response = NULL;
|
||||||
|
|
||||||
if (trigger == OGS_PFCP_DELETE_TRIGGER_UE_REQUESTED) {
|
if (trigger == OGS_PFCP_DELETE_TRIGGER_LOCAL_INITIATED) {
|
||||||
|
|
||||||
|
/* Nothing */
|
||||||
|
|
||||||
|
} else if (trigger == OGS_PFCP_DELETE_TRIGGER_UE_REQUESTED) {
|
||||||
ogs_pkbuf_t *n1smbuf = NULL, *n2smbuf = NULL;
|
ogs_pkbuf_t *n1smbuf = NULL, *n2smbuf = NULL;
|
||||||
|
|
||||||
n1smbuf = gsm_build_pdu_session_release_command(
|
n1smbuf = gsm_build_pdu_session_release_command(
|
||||||
|
@ -1215,14 +1219,23 @@ void smf_gsm_state_wait_pfcp_deletion(ogs_fsm_t *s, smf_event_t *e)
|
||||||
&pfcp_message->pfcp_session_deletion_response);
|
&pfcp_message->pfcp_session_deletion_response);
|
||||||
if (status != OGS_SBI_HTTP_STATUS_OK) {
|
if (status != OGS_SBI_HTTP_STATUS_OK) {
|
||||||
ogs_error(
|
ogs_error(
|
||||||
"smf_5gc_n4_handle_session_deletion_response() failed");
|
"[%d] smf_5gc_n4_handle_session_deletion_response() "
|
||||||
|
"failed", trigger);
|
||||||
|
|
||||||
|
OGS_FSM_TRAN(s, smf_gsm_state_session_will_release);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (send_sbi_message_from_delete_trigger(
|
if (send_sbi_message_from_delete_trigger(
|
||||||
sess, stream, trigger) == true) {
|
sess, stream, trigger) == true) {
|
||||||
|
|
||||||
if (trigger == OGS_PFCP_DELETE_TRIGGER_UE_REQUESTED ||
|
if (trigger == OGS_PFCP_DELETE_TRIGGER_LOCAL_INITIATED) {
|
||||||
|
|
||||||
|
ogs_warn("OLD Session Released");
|
||||||
|
OGS_FSM_TRAN(s, smf_gsm_state_session_will_release);
|
||||||
|
|
||||||
|
} else if (
|
||||||
|
trigger == OGS_PFCP_DELETE_TRIGGER_UE_REQUESTED ||
|
||||||
trigger == OGS_PFCP_DELETE_TRIGGER_PCF_INITIATED) {
|
trigger == OGS_PFCP_DELETE_TRIGGER_PCF_INITIATED) {
|
||||||
|
|
||||||
OGS_FSM_TRAN(s, smf_gsm_state_wait_5gc_n1_n2_release);
|
OGS_FSM_TRAN(s, smf_gsm_state_wait_5gc_n1_n2_release);
|
||||||
|
@ -1234,9 +1247,6 @@ void smf_gsm_state_wait_pfcp_deletion(ogs_fsm_t *s, smf_event_t *e)
|
||||||
|
|
||||||
OGS_FSM_TRAN(s, smf_gsm_state_session_will_release);
|
OGS_FSM_TRAN(s, smf_gsm_state_session_will_release);
|
||||||
|
|
||||||
} else if (trigger ==
|
|
||||||
OGS_PFCP_DELETE_TRIGGER_PCF_INITIATED) {
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ogs_fatal("Unknown trigger [%d]", trigger);
|
ogs_fatal("Unknown trigger [%d]", trigger);
|
||||||
ogs_assert_if_reached();
|
ogs_assert_if_reached();
|
||||||
|
|
|
@ -705,7 +705,7 @@ static void bearer_timeout(ogs_gtp_xact_t *xact, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
|
|
@ -486,43 +486,8 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact,
|
||||||
ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp);
|
ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp);
|
||||||
ogs_assert(ret == 0);
|
ogs_assert(ret == 0);
|
||||||
|
|
||||||
/* Set 3GPP-User-Location-Info */
|
/* 3GPP-User-Location-Info, 3GPP TS 29.061 16.4.7.2 22 */
|
||||||
if (sess->gtp.user_location_information.presence) {
|
smf_fd_msg_avp_add_3gpp_uli(sess, avpch1);
|
||||||
ogs_gtp2_uli_t uli;
|
|
||||||
int16_t uli_len;
|
|
||||||
|
|
||||||
uint8_t uli_buf[OGS_GTP2_MAX_ULI_LEN];
|
|
||||||
|
|
||||||
uli_len = ogs_gtp2_parse_uli(
|
|
||||||
&uli, &sess->gtp.user_location_information);
|
|
||||||
ogs_assert(sess->gtp.user_location_information.len == uli_len);
|
|
||||||
|
|
||||||
ogs_assert(sess->gtp.user_location_information.data);
|
|
||||||
ogs_assert(sess->gtp.user_location_information.len);
|
|
||||||
memcpy(&uli_buf, sess->gtp.user_location_information.data,
|
|
||||||
sess->gtp.user_location_information.len);
|
|
||||||
|
|
||||||
/* Update Gx ULI Type */
|
|
||||||
if (uli.flags.tai && uli.flags.e_cgi)
|
|
||||||
uli_buf[0] =
|
|
||||||
OGS_DIAM_GX_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_ECGI;
|
|
||||||
else if (uli.flags.tai)
|
|
||||||
uli_buf[0] = OGS_DIAM_GX_3GPP_USER_LOCATION_INFO_TYPE_TAI;
|
|
||||||
else if (uli.flags.e_cgi)
|
|
||||||
uli_buf[0] = OGS_DIAM_GX_3GPP_USER_LOCATION_INFO_TYPE_ECGI;
|
|
||||||
|
|
||||||
if (uli_buf[0]) {
|
|
||||||
ret = fd_msg_avp_new(
|
|
||||||
ogs_diam_gx_3gpp_user_location_info, 0, &avp);
|
|
||||||
ogs_assert(ret == 0);
|
|
||||||
val.os.data = (uint8_t *)&uli_buf;
|
|
||||||
val.os.len = sess->gtp.user_location_information.len;
|
|
||||||
ret = fd_msg_avp_setvalue(avp, &val);
|
|
||||||
ogs_assert(ret == 0);
|
|
||||||
ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp);
|
|
||||||
ogs_assert(ret == 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set 3GPP-MS-Timezone */
|
/* Set 3GPP-MS-Timezone */
|
||||||
if (sess->gtp.ue_timezone.presence &&
|
if (sess->gtp.ue_timezone.presence &&
|
||||||
|
|
|
@ -174,7 +174,7 @@ void smf_gy_handle_cca_update_request(
|
||||||
/* Send PFCP Session Modification Request if we need to update the params. */
|
/* Send PFCP Session Modification Request if we need to update the params. */
|
||||||
if (modify_flags) {
|
if (modify_flags) {
|
||||||
modify_flags |= OGS_PFCP_MODIFY_URR|OGS_PFCP_MODIFY_UL_ONLY;
|
modify_flags |= OGS_PFCP_MODIFY_URR|OGS_PFCP_MODIFY_UL_ONLY;
|
||||||
rv = smf_epc_pfcp_send_pdr_modification_request(
|
rv = smf_epc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, pfcp_xact, NULL, modify_flags,
|
sess, pfcp_xact, NULL, modify_flags,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP1_CAUSE_REACTIACTION_REQUESTED);
|
OGS_GTP1_CAUSE_REACTIACTION_REQUESTED);
|
||||||
|
|
|
@ -466,43 +466,8 @@ static void fill_service_information_ccr(smf_sess_t *sess,
|
||||||
ogs_assert(ret == 0);
|
ogs_assert(ret == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 3GPP-User-Location-Info */
|
/* 3GPP-User-Location-Info, 3GPP TS 29.061 16.4.7.2 22 */
|
||||||
if (sess->gtp.user_location_information.presence) {
|
smf_fd_msg_avp_add_3gpp_uli(sess, avpch1);
|
||||||
ogs_gtp2_uli_t uli;
|
|
||||||
int16_t uli_len;
|
|
||||||
|
|
||||||
uint8_t uli_buf[OGS_GTP2_MAX_ULI_LEN];
|
|
||||||
|
|
||||||
uli_len = ogs_gtp2_parse_uli(
|
|
||||||
&uli, &sess->gtp.user_location_information);
|
|
||||||
ogs_assert(sess->gtp.user_location_information.len == uli_len);
|
|
||||||
|
|
||||||
ogs_assert(sess->gtp.user_location_information.data);
|
|
||||||
ogs_assert(sess->gtp.user_location_information.len);
|
|
||||||
memcpy(&uli_buf, sess->gtp.user_location_information.data,
|
|
||||||
sess->gtp.user_location_information.len);
|
|
||||||
|
|
||||||
/* Update Gy ULI Type */
|
|
||||||
if (uli.flags.tai && uli.flags.e_cgi)
|
|
||||||
uli_buf[0] =
|
|
||||||
OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_ECGI;
|
|
||||||
else if (uli.flags.tai)
|
|
||||||
uli_buf[0] = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_TAI;
|
|
||||||
else if (uli.flags.e_cgi)
|
|
||||||
uli_buf[0] = OGS_DIAM_GY_3GPP_USER_LOCATION_INFO_TYPE_ECGI;
|
|
||||||
|
|
||||||
if (uli_buf[0]) {
|
|
||||||
ret = fd_msg_avp_new(
|
|
||||||
ogs_diam_gy_3gpp_user_location_info, 0, &avpch2);
|
|
||||||
ogs_assert(ret == 0);
|
|
||||||
val.os.data = (uint8_t *)&uli_buf;
|
|
||||||
val.os.len = sess->gtp.user_location_information.len;
|
|
||||||
ret = fd_msg_avp_setvalue(avpch2, &val);
|
|
||||||
ogs_assert(ret == 0);
|
|
||||||
ret = fd_msg_avp_add(avpch1, MSG_BRW_LAST_CHILD, avpch2);
|
|
||||||
ogs_assert(ret == 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sess->smf_ue->imeisv_len > 0) {
|
if (sess->smf_ue->imeisv_len > 0) {
|
||||||
/* User-Equipment-Info, 3GPP TS 32.299 7.1.17 */
|
/* User-Equipment-Info, 3GPP TS 32.299 7.1.17 */
|
||||||
|
|
|
@ -265,7 +265,7 @@ void smf_5gc_n4_handle_session_modification_response(
|
||||||
stream = xact->assoc_stream;
|
stream = xact->assoc_stream;
|
||||||
|
|
||||||
if (flags & OGS_PFCP_MODIFY_SESSION) {
|
if (flags & OGS_PFCP_MODIFY_SESSION) {
|
||||||
/* If smf_5gc_pfcp_send_pdr_modification_request() is called */
|
/* If smf_5gc_pfcp_send_all_pdr_modification_request() is called */
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* If smf_5gc_pfcp_send_qos_flow_modification_request() is called */
|
/* If smf_5gc_pfcp_send_qos_flow_modification_request() is called */
|
||||||
|
@ -390,7 +390,7 @@ void smf_5gc_n4_handle_session_modification_response(
|
||||||
|
|
||||||
if (smf_sess_have_indirect_data_forwarding(sess) == true) {
|
if (smf_sess_have_indirect_data_forwarding(sess) == true) {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_INDIRECT|OGS_PFCP_MODIFY_REMOVE,
|
OGS_PFCP_MODIFY_INDIRECT|OGS_PFCP_MODIFY_REMOVE,
|
||||||
ogs_app()->time.handover.duration));
|
ogs_app()->time.handover.duration));
|
||||||
|
@ -444,7 +444,7 @@ void smf_5gc_n4_handle_session_modification_response(
|
||||||
smf_sess_create_indirect_data_forwarding(sess);
|
smf_sess_create_indirect_data_forwarding(sess);
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_INDIRECT|OGS_PFCP_MODIFY_CREATE,
|
OGS_PFCP_MODIFY_INDIRECT|OGS_PFCP_MODIFY_CREATE,
|
||||||
0));
|
0));
|
||||||
|
@ -485,7 +485,6 @@ void smf_5gc_n4_handle_session_modification_response(
|
||||||
ogs_assert(stream);
|
ogs_assert(stream);
|
||||||
|
|
||||||
ogs_assert(flags & OGS_PFCP_MODIFY_SESSION);
|
ogs_assert(flags & OGS_PFCP_MODIFY_SESSION);
|
||||||
|
|
||||||
n1smbuf = gsm_build_pdu_session_modification_command(
|
n1smbuf = gsm_build_pdu_session_modification_command(
|
||||||
sess, sess->pti,
|
sess, sess->pti,
|
||||||
OGS_NAS_QOS_CODE_DELETE_EXISTING_QOS_RULE,
|
OGS_NAS_QOS_CODE_DELETE_EXISTING_QOS_RULE,
|
||||||
|
@ -642,9 +641,13 @@ int smf_5gc_n4_handle_session_deletion_response(
|
||||||
|
|
||||||
if (status != OGS_SBI_HTTP_STATUS_OK) {
|
if (status != OGS_SBI_HTTP_STATUS_OK) {
|
||||||
char *strerror = ogs_msprintf(
|
char *strerror = ogs_msprintf(
|
||||||
"PFCP Cause [%d] : Not Accepted", rsp->cause.u8);
|
"[%d] PFCP Cause [%d] : Not Accepted", trigger, rsp->cause.u8);
|
||||||
|
|
||||||
if (trigger == OGS_PFCP_DELETE_TRIGGER_UE_REQUESTED ||
|
if (trigger == OGS_PFCP_DELETE_TRIGGER_LOCAL_INITIATED) {
|
||||||
|
|
||||||
|
/* Nothing */
|
||||||
|
|
||||||
|
} else if (trigger == OGS_PFCP_DELETE_TRIGGER_UE_REQUESTED ||
|
||||||
trigger == OGS_PFCP_DELETE_TRIGGER_AMF_UPDATE_SM_CONTEXT) {
|
trigger == OGS_PFCP_DELETE_TRIGGER_AMF_UPDATE_SM_CONTEXT) {
|
||||||
ogs_assert(stream);
|
ogs_assert(stream);
|
||||||
smf_sbi_send_sm_context_update_error(
|
smf_sbi_send_sm_context_update_error(
|
||||||
|
@ -1219,7 +1222,7 @@ void smf_n4_handle_session_report_request(
|
||||||
|
|
||||||
if (error_indication_session) {
|
if (error_indication_session) {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
error_indication_session, NULL,
|
error_indication_session, NULL,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE|
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE|
|
||||||
OGS_PFCP_MODIFY_ERROR_INDICATION,
|
OGS_PFCP_MODIFY_ERROR_INDICATION,
|
||||||
|
|
|
@ -147,7 +147,7 @@ int ngap_handle_pdu_session_resource_setup_response_transfer(
|
||||||
|
|
||||||
if (far_update) {
|
if (far_update) {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream, OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE,
|
sess, stream, OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE,
|
||||||
0));
|
0));
|
||||||
} else {
|
} else {
|
||||||
|
@ -247,7 +247,7 @@ int ngap_handle_pdu_session_resource_setup_unsuccessful_transfer(
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE, 0));
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE, 0));
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ int ngap_handle_pdu_session_resource_modify_response_transfer(
|
||||||
}
|
}
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_session_modification_request(
|
smf_5gc_pfcp_send_qos_flow_list_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE, 0));
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE, 0));
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ int ngap_handle_path_switch_request_transfer(
|
||||||
|
|
||||||
if (far_update) {
|
if (far_update) {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE|
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE|
|
||||||
OGS_PFCP_MODIFY_XN_HANDOVER|OGS_PFCP_MODIFY_END_MARKER,
|
OGS_PFCP_MODIFY_XN_HANDOVER|OGS_PFCP_MODIFY_END_MARKER,
|
||||||
|
@ -683,7 +683,7 @@ int ngap_handle_handover_request_ack(
|
||||||
ogs_error("It will be automatically removed");
|
ogs_error("It will be automatically removed");
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_INDIRECT|
|
OGS_PFCP_MODIFY_INDIRECT|
|
||||||
/*
|
/*
|
||||||
|
@ -705,7 +705,7 @@ int ngap_handle_handover_request_ack(
|
||||||
smf_sess_create_indirect_data_forwarding(sess);
|
smf_sess_create_indirect_data_forwarding(sess);
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_INDIRECT|OGS_PFCP_MODIFY_CREATE,
|
OGS_PFCP_MODIFY_INDIRECT|OGS_PFCP_MODIFY_CREATE,
|
||||||
0));
|
0));
|
||||||
|
|
|
@ -370,7 +370,7 @@ bool smf_nsmf_handle_update_sm_context(
|
||||||
sess, stream, OpenAPI_up_cnx_state_DEACTIVATED);
|
sess, stream, OpenAPI_up_cnx_state_DEACTIVATED);
|
||||||
} else {
|
} else {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE, 0));
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE, 0));
|
||||||
}
|
}
|
||||||
|
@ -506,7 +506,7 @@ bool smf_nsmf_handle_update_sm_context(
|
||||||
|
|
||||||
if (far_update) {
|
if (far_update) {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE|
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_ACTIVATE|
|
||||||
OGS_PFCP_MODIFY_N2_HANDOVER|OGS_PFCP_MODIFY_END_MARKER,
|
OGS_PFCP_MODIFY_N2_HANDOVER|OGS_PFCP_MODIFY_END_MARKER,
|
||||||
|
@ -539,7 +539,7 @@ bool smf_nsmf_handle_update_sm_context(
|
||||||
|
|
||||||
if (smf_sess_have_indirect_data_forwarding(sess) == true) {
|
if (smf_sess_have_indirect_data_forwarding(sess) == true) {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_5gc_pfcp_send_pdr_modification_request(
|
smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
sess, stream,
|
sess, stream,
|
||||||
OGS_PFCP_MODIFY_INDIRECT|OGS_PFCP_MODIFY_REMOVE|
|
OGS_PFCP_MODIFY_INDIRECT|OGS_PFCP_MODIFY_REMOVE|
|
||||||
OGS_PFCP_MODIFY_HANDOVER_CANCEL,
|
OGS_PFCP_MODIFY_HANDOVER_CANCEL,
|
||||||
|
|
|
@ -169,6 +169,7 @@ static void sess_5gc_timeout(ogs_pfcp_xact_t *xact, void *data)
|
||||||
smf_sess_t *sess = NULL;
|
smf_sess_t *sess = NULL;
|
||||||
ogs_sbi_stream_t *stream = NULL;
|
ogs_sbi_stream_t *stream = NULL;
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
|
int trigger;
|
||||||
char *strerror = NULL;
|
char *strerror = NULL;
|
||||||
|
|
||||||
ogs_assert(xact);
|
ogs_assert(xact);
|
||||||
|
@ -176,12 +177,12 @@ static void sess_5gc_timeout(ogs_pfcp_xact_t *xact, void *data)
|
||||||
|
|
||||||
sess = data;
|
sess = data;
|
||||||
ogs_assert(sess);
|
ogs_assert(sess);
|
||||||
stream = xact->assoc_stream;
|
|
||||||
ogs_assert(stream);
|
|
||||||
smf_ue = sess->smf_ue;
|
smf_ue = sess->smf_ue;
|
||||||
ogs_assert(smf_ue);
|
ogs_assert(smf_ue);
|
||||||
|
|
||||||
|
stream = xact->assoc_stream;
|
||||||
type = xact->seq[0].type;
|
type = xact->seq[0].type;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case OGS_PFCP_SESSION_ESTABLISHMENT_REQUEST_TYPE:
|
case OGS_PFCP_SESSION_ESTABLISHMENT_REQUEST_TYPE:
|
||||||
ogs_error("No PFCP session establishment response");
|
ogs_error("No PFCP session establishment response");
|
||||||
|
@ -192,21 +193,43 @@ static void sess_5gc_timeout(ogs_pfcp_xact_t *xact, void *data)
|
||||||
ogs_assert(strerror);
|
ogs_assert(strerror);
|
||||||
|
|
||||||
ogs_error("%s", strerror);
|
ogs_error("%s", strerror);
|
||||||
|
ogs_assert(stream);
|
||||||
smf_sbi_send_sm_context_update_error(stream,
|
smf_sbi_send_sm_context_update_error(stream,
|
||||||
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT,
|
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT,
|
||||||
strerror, NULL, NULL, NULL);
|
strerror, NULL, NULL, NULL);
|
||||||
ogs_free(strerror);
|
ogs_free(strerror);
|
||||||
break;
|
break;
|
||||||
case OGS_PFCP_SESSION_DELETION_REQUEST_TYPE:
|
case OGS_PFCP_SESSION_DELETION_REQUEST_TYPE:
|
||||||
strerror = ogs_msprintf("[%s:%d] No PFCP session deletion response",
|
trigger = xact->delete_trigger;
|
||||||
smf_ue->supi, sess->psi);
|
ogs_assert(trigger);
|
||||||
|
|
||||||
|
strerror = ogs_msprintf("[%s:%d] No PFCP session deletion response[%d]",
|
||||||
|
smf_ue->supi, sess->psi, trigger);
|
||||||
ogs_assert(strerror);
|
ogs_assert(strerror);
|
||||||
|
|
||||||
ogs_error("%s", strerror);
|
ogs_error("%s", strerror);
|
||||||
ogs_assert(true ==
|
|
||||||
ogs_sbi_server_send_error(stream,
|
if (trigger == OGS_PFCP_DELETE_TRIGGER_LOCAL_INITIATED ||
|
||||||
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL, strerror, NULL));
|
trigger == OGS_PFCP_DELETE_TRIGGER_PCF_INITIATED) {
|
||||||
|
|
||||||
|
/* Nothing */
|
||||||
|
|
||||||
|
} else if (trigger == OGS_PFCP_DELETE_TRIGGER_UE_REQUESTED ||
|
||||||
|
trigger == OGS_PFCP_DELETE_TRIGGER_AMF_UPDATE_SM_CONTEXT ||
|
||||||
|
trigger == OGS_PFCP_DELETE_TRIGGER_AMF_RELEASE_SM_CONTEXT) {
|
||||||
|
|
||||||
|
ogs_assert(stream);
|
||||||
|
ogs_assert(true ==
|
||||||
|
ogs_sbi_server_send_error(stream,
|
||||||
|
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL, strerror, NULL));
|
||||||
|
} else {
|
||||||
|
ogs_fatal("Unknown trigger [%d]", trigger);
|
||||||
|
ogs_assert_if_reached();
|
||||||
|
}
|
||||||
|
|
||||||
ogs_free(strerror);
|
ogs_free(strerror);
|
||||||
|
|
||||||
|
smf_sess_remove(sess);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ogs_error("Not implemented [type:%d]", type);
|
ogs_error("Not implemented [type:%d]", type);
|
||||||
|
@ -321,29 +344,7 @@ int smf_5gc_pfcp_send_session_establishment_request(
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
int smf_5gc_pfcp_send_session_modification_request(
|
int smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
smf_sess_t *sess, ogs_sbi_stream_t *stream,
|
|
||||||
uint64_t flags, ogs_time_t duration)
|
|
||||||
{
|
|
||||||
int rv;
|
|
||||||
ogs_pfcp_xact_t *xact = NULL;
|
|
||||||
|
|
||||||
ogs_assert(sess);
|
|
||||||
|
|
||||||
xact = ogs_pfcp_xact_local_create(sess->pfcp_node, sess_5gc_timeout, sess);
|
|
||||||
ogs_expect_or_return_val(xact, OGS_ERROR);
|
|
||||||
|
|
||||||
xact->assoc_stream = stream;
|
|
||||||
xact->modify_flags = flags | OGS_PFCP_MODIFY_SESSION;
|
|
||||||
|
|
||||||
rv = smf_pfcp_send_modify_list(
|
|
||||||
sess, smf_n4_build_qos_flow_to_modify_list, xact, duration);
|
|
||||||
ogs_expect(rv == OGS_OK);
|
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
int smf_5gc_pfcp_send_pdr_modification_request(
|
|
||||||
smf_sess_t *sess, ogs_sbi_stream_t *stream,
|
smf_sess_t *sess, ogs_sbi_stream_t *stream,
|
||||||
uint64_t flags, ogs_time_t duration)
|
uint64_t flags, ogs_time_t duration)
|
||||||
{
|
{
|
||||||
|
@ -372,6 +373,28 @@ int smf_5gc_pfcp_send_pdr_modification_request(
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int smf_5gc_pfcp_send_qos_flow_list_modification_request(
|
||||||
|
smf_sess_t *sess, ogs_sbi_stream_t *stream,
|
||||||
|
uint64_t flags, ogs_time_t duration)
|
||||||
|
{
|
||||||
|
int rv;
|
||||||
|
ogs_pfcp_xact_t *xact = NULL;
|
||||||
|
|
||||||
|
ogs_assert(sess);
|
||||||
|
|
||||||
|
xact = ogs_pfcp_xact_local_create(sess->pfcp_node, sess_5gc_timeout, sess);
|
||||||
|
ogs_expect_or_return_val(xact, OGS_ERROR);
|
||||||
|
|
||||||
|
xact->assoc_stream = stream;
|
||||||
|
xact->modify_flags = flags | OGS_PFCP_MODIFY_SESSION;
|
||||||
|
|
||||||
|
rv = smf_pfcp_send_modify_list(
|
||||||
|
sess, smf_n4_build_qos_flow_to_modify_list, xact, duration);
|
||||||
|
ogs_expect(rv == OGS_OK);
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
int smf_5gc_pfcp_send_session_deletion_request(
|
int smf_5gc_pfcp_send_session_deletion_request(
|
||||||
smf_sess_t *sess, ogs_sbi_stream_t *stream, int trigger)
|
smf_sess_t *sess, ogs_sbi_stream_t *stream, int trigger)
|
||||||
{
|
{
|
||||||
|
@ -437,68 +460,7 @@ int smf_epc_pfcp_send_session_establishment_request(
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
int smf_epc_pfcp_send_session_modification_request(
|
int smf_epc_pfcp_send_all_pdr_modification_request(
|
||||||
smf_sess_t *sess, void *gtp_xact,
|
|
||||||
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause,
|
|
||||||
ogs_time_t duration)
|
|
||||||
{
|
|
||||||
int rv;
|
|
||||||
ogs_pfcp_xact_t *xact = NULL;
|
|
||||||
|
|
||||||
ogs_assert(sess);
|
|
||||||
|
|
||||||
xact = ogs_pfcp_xact_local_create(
|
|
||||||
sess->pfcp_node, sess_epc_timeout, sess);
|
|
||||||
ogs_expect_or_return_val(xact, OGS_ERROR);
|
|
||||||
|
|
||||||
xact->epc = true; /* EPC PFCP transaction */
|
|
||||||
xact->assoc_xact = gtp_xact;
|
|
||||||
xact->modify_flags = flags | OGS_PFCP_MODIFY_SESSION;
|
|
||||||
|
|
||||||
xact->gtp_pti = gtp_pti;
|
|
||||||
xact->gtp_cause = gtp_cause;
|
|
||||||
|
|
||||||
rv = smf_pfcp_send_modify_list(
|
|
||||||
sess, smf_n4_build_qos_flow_to_modify_list, xact, duration);
|
|
||||||
ogs_expect(rv == OGS_OK);
|
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
int smf_epc_pfcp_send_bearer_modification_request(
|
|
||||||
smf_bearer_t *bearer, void *gtp_xact,
|
|
||||||
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause)
|
|
||||||
{
|
|
||||||
int rv;
|
|
||||||
ogs_pfcp_xact_t *xact = NULL;
|
|
||||||
smf_sess_t *sess = NULL;
|
|
||||||
|
|
||||||
ogs_assert(bearer);
|
|
||||||
sess = bearer->sess;
|
|
||||||
ogs_assert(sess);
|
|
||||||
|
|
||||||
xact = ogs_pfcp_xact_local_create(
|
|
||||||
sess->pfcp_node, bearer_epc_timeout, bearer);
|
|
||||||
ogs_expect_or_return_val(xact, OGS_ERROR);
|
|
||||||
|
|
||||||
xact->epc = true; /* EPC PFCP transaction */
|
|
||||||
xact->assoc_xact = gtp_xact;
|
|
||||||
xact->modify_flags = flags;
|
|
||||||
|
|
||||||
xact->gtp_pti = gtp_pti;
|
|
||||||
xact->gtp_cause = gtp_cause;
|
|
||||||
|
|
||||||
ogs_list_init(&sess->qos_flow_to_modify_list);
|
|
||||||
ogs_list_add(&sess->qos_flow_to_modify_list, &bearer->to_modify_node);
|
|
||||||
|
|
||||||
rv = smf_pfcp_send_modify_list(
|
|
||||||
sess, smf_n4_build_qos_flow_to_modify_list, xact, 0);
|
|
||||||
ogs_expect(rv == OGS_OK);
|
|
||||||
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
int smf_epc_pfcp_send_pdr_modification_request(
|
|
||||||
smf_sess_t *sess, void *gtp_xact, ogs_pkbuf_t *gtpbuf,
|
smf_sess_t *sess, void *gtp_xact, ogs_pkbuf_t *gtpbuf,
|
||||||
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause)
|
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause)
|
||||||
{
|
{
|
||||||
|
@ -533,6 +495,39 @@ int smf_epc_pfcp_send_pdr_modification_request(
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
|
smf_bearer_t *bearer, void *gtp_xact,
|
||||||
|
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause)
|
||||||
|
{
|
||||||
|
int rv;
|
||||||
|
ogs_pfcp_xact_t *xact = NULL;
|
||||||
|
smf_sess_t *sess = NULL;
|
||||||
|
|
||||||
|
ogs_assert(bearer);
|
||||||
|
sess = bearer->sess;
|
||||||
|
ogs_assert(sess);
|
||||||
|
|
||||||
|
xact = ogs_pfcp_xact_local_create(
|
||||||
|
sess->pfcp_node, bearer_epc_timeout, bearer);
|
||||||
|
ogs_expect_or_return_val(xact, OGS_ERROR);
|
||||||
|
|
||||||
|
xact->epc = true; /* EPC PFCP transaction */
|
||||||
|
xact->assoc_xact = gtp_xact;
|
||||||
|
xact->modify_flags = flags;
|
||||||
|
|
||||||
|
xact->gtp_pti = gtp_pti;
|
||||||
|
xact->gtp_cause = gtp_cause;
|
||||||
|
|
||||||
|
ogs_list_init(&sess->qos_flow_to_modify_list);
|
||||||
|
ogs_list_add(&sess->qos_flow_to_modify_list, &bearer->to_modify_node);
|
||||||
|
|
||||||
|
rv = smf_pfcp_send_modify_list(
|
||||||
|
sess, smf_n4_build_qos_flow_to_modify_list, xact, 0);
|
||||||
|
ogs_expect(rv == OGS_OK);
|
||||||
|
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
int smf_epc_pfcp_send_session_deletion_request(
|
int smf_epc_pfcp_send_session_deletion_request(
|
||||||
smf_sess_t *sess, void *gtp_xact)
|
smf_sess_t *sess, void *gtp_xact)
|
||||||
{
|
{
|
||||||
|
@ -607,7 +602,7 @@ int smf_epc_pfcp_send_deactivation(smf_sess_t *sess, uint8_t gtp_cause)
|
||||||
ogs_list_first(&wlan_sess->bearer_list), OGS_ERROR);
|
ogs_list_first(&wlan_sess->bearer_list), OGS_ERROR);
|
||||||
|
|
||||||
/* Deactivate WLAN Session */
|
/* Deactivate WLAN Session */
|
||||||
rv = smf_epc_pfcp_send_pdr_modification_request(
|
rv = smf_epc_pfcp_send_all_pdr_modification_request(
|
||||||
wlan_sess, NULL, NULL,
|
wlan_sess, NULL, NULL,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE,
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
|
@ -624,7 +619,7 @@ int smf_epc_pfcp_send_deactivation(smf_sess_t *sess, uint8_t gtp_cause)
|
||||||
ogs_list_first(&eutran_sess->bearer_list), OGS_ERROR);
|
ogs_list_first(&eutran_sess->bearer_list), OGS_ERROR);
|
||||||
|
|
||||||
/* Deactivate EUTRAN Session */
|
/* Deactivate EUTRAN Session */
|
||||||
rv = smf_epc_pfcp_send_pdr_modification_request(
|
rv = smf_epc_pfcp_send_all_pdr_modification_request(
|
||||||
eutran_sess, NULL, NULL,
|
eutran_sess, NULL, NULL,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE,
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
|
|
|
@ -37,10 +37,10 @@ int smf_pfcp_send_modify_list(
|
||||||
|
|
||||||
int smf_5gc_pfcp_send_session_establishment_request(
|
int smf_5gc_pfcp_send_session_establishment_request(
|
||||||
smf_sess_t *sess, ogs_sbi_stream_t *stream);
|
smf_sess_t *sess, ogs_sbi_stream_t *stream);
|
||||||
int smf_5gc_pfcp_send_session_modification_request(
|
int smf_5gc_pfcp_send_all_pdr_modification_request(
|
||||||
smf_sess_t *sess, ogs_sbi_stream_t *stream,
|
smf_sess_t *sess, ogs_sbi_stream_t *stream,
|
||||||
uint64_t flags, ogs_time_t duration);
|
uint64_t flags, ogs_time_t duration);
|
||||||
int smf_5gc_pfcp_send_pdr_modification_request(
|
int smf_5gc_pfcp_send_qos_flow_list_modification_request(
|
||||||
smf_sess_t *sess, ogs_sbi_stream_t *stream,
|
smf_sess_t *sess, ogs_sbi_stream_t *stream,
|
||||||
uint64_t flags, ogs_time_t duration);
|
uint64_t flags, ogs_time_t duration);
|
||||||
int smf_5gc_pfcp_send_session_deletion_request(
|
int smf_5gc_pfcp_send_session_deletion_request(
|
||||||
|
@ -48,16 +48,12 @@ int smf_5gc_pfcp_send_session_deletion_request(
|
||||||
|
|
||||||
int smf_epc_pfcp_send_session_establishment_request(
|
int smf_epc_pfcp_send_session_establishment_request(
|
||||||
smf_sess_t *sess, void *gtp_xact);
|
smf_sess_t *sess, void *gtp_xact);
|
||||||
int smf_epc_pfcp_send_session_modification_request(
|
int smf_epc_pfcp_send_all_pdr_modification_request(
|
||||||
smf_sess_t *sess, void *gtp_xact,
|
|
||||||
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause,
|
|
||||||
ogs_time_t duration);
|
|
||||||
int smf_epc_pfcp_send_bearer_modification_request(
|
|
||||||
smf_bearer_t *bearer, void *gtp_xact,
|
|
||||||
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause);
|
|
||||||
int smf_epc_pfcp_send_pdr_modification_request(
|
|
||||||
smf_sess_t *sess, void *gtp_xact, ogs_pkbuf_t *gtpbuf,
|
smf_sess_t *sess, void *gtp_xact, ogs_pkbuf_t *gtpbuf,
|
||||||
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause);
|
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause);
|
||||||
|
int smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
|
smf_bearer_t *bearer, void *gtp_xact,
|
||||||
|
uint64_t flags, uint8_t gtp_pti, uint8_t gtp_cause);
|
||||||
int smf_epc_pfcp_send_session_deletion_request(
|
int smf_epc_pfcp_send_session_deletion_request(
|
||||||
smf_sess_t *sess, void *gtp_xact);
|
smf_sess_t *sess, void *gtp_xact);
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ uint8_t smf_s5c_handle_create_session_request(
|
||||||
if (eutran_sess) {
|
if (eutran_sess) {
|
||||||
/* Need to check handover is possible */
|
/* Need to check handover is possible */
|
||||||
int eutran_session_count = 0;
|
int eutran_session_count = 0;
|
||||||
ogs_list_for_each(&smf_ue->sess_list, eutran_sess) {
|
ogs_list_reverse_for_each(&smf_ue->sess_list, eutran_sess) {
|
||||||
if (eutran_sess->gtp_rat_type != OGS_GTP2_RAT_TYPE_EUTRAN)
|
if (eutran_sess->gtp_rat_type != OGS_GTP2_RAT_TYPE_EUTRAN)
|
||||||
continue;
|
continue;
|
||||||
if (strcmp(eutran_sess->session.name, sess->session.name) == 0)
|
if (strcmp(eutran_sess->session.name, sess->session.name) == 0)
|
||||||
|
@ -621,7 +621,7 @@ void smf_s5c_handle_create_bearer_response(
|
||||||
|
|
||||||
if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) {
|
if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
@ -678,7 +678,7 @@ void smf_s5c_handle_create_bearer_response(
|
||||||
|
|
||||||
if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) {
|
if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) {
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
@ -696,7 +696,7 @@ void smf_s5c_handle_create_bearer_response(
|
||||||
if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) {
|
if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) {
|
||||||
ogs_error("GTP Failed [Bearer-CAUSE:%d]", cause_value);
|
ogs_error("GTP Failed [Bearer-CAUSE:%d]", cause_value);
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
@ -709,7 +709,7 @@ void smf_s5c_handle_create_bearer_response(
|
||||||
if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) {
|
if (cause_value != OGS_GTP2_CAUSE_REQUEST_ACCEPTED) {
|
||||||
ogs_error("GTP Failed [CAUSE:%d]", cause_value);
|
ogs_error("GTP Failed [CAUSE:%d]", cause_value);
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
@ -753,7 +753,7 @@ void smf_s5c_handle_create_bearer_response(
|
||||||
dl_far->outer_header_creation.teid = bearer->sgw_s5u_teid;
|
dl_far->outer_header_creation.teid = bearer->sgw_s5u_teid;
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, OGS_PFCP_MODIFY_ACTIVATE,
|
bearer, NULL, OGS_PFCP_MODIFY_ACTIVATE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
@ -872,7 +872,7 @@ void smf_s5c_handle_update_bearer_response(
|
||||||
|
|
||||||
if (pfcp_flags)
|
if (pfcp_flags)
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, pfcp_flags,
|
bearer, NULL, pfcp_flags,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
@ -990,7 +990,7 @@ bool smf_s5c_handle_delete_bearer_response(
|
||||||
sess->sgw_s5c_teid, sess->smf_n4_teid);
|
sess->sgw_s5c_teid, sess->smf_n4_teid);
|
||||||
|
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
bearer, NULL, OGS_PFCP_MODIFY_REMOVE,
|
||||||
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
OGS_NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED,
|
||||||
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
OGS_GTP2_CAUSE_UNDEFINED_VALUE));
|
||||||
|
@ -1372,7 +1372,7 @@ void smf_s5c_handle_bearer_resource_command(
|
||||||
* forwarding downlink packets for the affected bearer(s).
|
* forwarding downlink packets for the affected bearer(s).
|
||||||
*/
|
*/
|
||||||
ogs_assert(OGS_OK ==
|
ogs_assert(OGS_OK ==
|
||||||
smf_epc_pfcp_send_bearer_modification_request(
|
smf_epc_pfcp_send_one_bearer_modification_request(
|
||||||
bearer, xact,
|
bearer, xact,
|
||||||
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE,
|
OGS_PFCP_MODIFY_DL_ONLY|OGS_PFCP_MODIFY_DEACTIVATE,
|
||||||
cmd->procedure_transaction_id.u8,
|
cmd->procedure_transaction_id.u8,
|
||||||
|
|
|
@ -822,6 +822,8 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
|
||||||
ogs_assert(sess);
|
ogs_assert(sess);
|
||||||
ogs_assert(OGS_FSM_STATE(&sess->sm));
|
ogs_assert(OGS_FSM_STATE(&sess->sm));
|
||||||
|
|
||||||
|
sess->pti = nas_message.gsm.h.procedure_transaction_identity;
|
||||||
|
|
||||||
e->nas.message = &nas_message;
|
e->nas.message = &nas_message;
|
||||||
ogs_fsm_dispatch(&sess->sm, e);
|
ogs_fsm_dispatch(&sess->sm, e);
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,10 @@ void upf_context_init(void)
|
||||||
ogs_list_init(&self.sess_list);
|
ogs_list_init(&self.sess_list);
|
||||||
ogs_pool_init(&upf_sess_pool, ogs_app()->pool.sess);
|
ogs_pool_init(&upf_sess_pool, ogs_app()->pool.sess);
|
||||||
|
|
||||||
self.sess_hash = ogs_hash_make();
|
self.seid_hash = ogs_hash_make();
|
||||||
ogs_assert(self.sess_hash);
|
ogs_assert(self.seid_hash);
|
||||||
|
self.f_seid_hash = ogs_hash_make();
|
||||||
|
ogs_assert(self.f_seid_hash);
|
||||||
self.ipv4_hash = ogs_hash_make();
|
self.ipv4_hash = ogs_hash_make();
|
||||||
ogs_assert(self.ipv4_hash);
|
ogs_assert(self.ipv4_hash);
|
||||||
self.ipv6_hash = ogs_hash_make();
|
self.ipv6_hash = ogs_hash_make();
|
||||||
|
@ -64,8 +66,10 @@ void upf_context_final(void)
|
||||||
|
|
||||||
upf_sess_remove_all();
|
upf_sess_remove_all();
|
||||||
|
|
||||||
ogs_assert(self.sess_hash);
|
ogs_assert(self.seid_hash);
|
||||||
ogs_hash_destroy(self.sess_hash);
|
ogs_hash_destroy(self.seid_hash);
|
||||||
|
ogs_assert(self.f_seid_hash);
|
||||||
|
ogs_hash_destroy(self.f_seid_hash);
|
||||||
ogs_assert(self.ipv4_hash);
|
ogs_assert(self.ipv4_hash);
|
||||||
ogs_hash_destroy(self.ipv4_hash);
|
ogs_hash_destroy(self.ipv4_hash);
|
||||||
ogs_assert(self.ipv6_hash);
|
ogs_assert(self.ipv6_hash);
|
||||||
|
@ -155,9 +159,18 @@ upf_sess_t *upf_sess_add(ogs_pfcp_f_seid_t *cp_f_seid)
|
||||||
ogs_assert(sess->index > 0 && sess->index <= ogs_app()->pool.sess);
|
ogs_assert(sess->index > 0 && sess->index <= ogs_app()->pool.sess);
|
||||||
|
|
||||||
sess->upf_n4_seid = sess->index;
|
sess->upf_n4_seid = sess->index;
|
||||||
sess->smf_n4_seid = cp_f_seid->seid;
|
|
||||||
ogs_hash_set(self.sess_hash, &sess->smf_n4_seid,
|
/* Since F-SEID is composed of ogs_ip_t and uint64-seid,
|
||||||
sizeof(sess->smf_n4_seid), sess);
|
* all these values must be put into the structure-smf_n4_f_seid
|
||||||
|
* before creating hash */
|
||||||
|
sess->smf_n4_f_seid.seid = cp_f_seid->seid;
|
||||||
|
ogs_assert(OGS_OK ==
|
||||||
|
ogs_pfcp_f_seid_to_ip(cp_f_seid, &sess->smf_n4_f_seid.ip));
|
||||||
|
|
||||||
|
ogs_hash_set(self.f_seid_hash, &sess->smf_n4_f_seid,
|
||||||
|
sizeof(sess->smf_n4_f_seid), sess);
|
||||||
|
ogs_hash_set(self.seid_hash, &sess->smf_n4_f_seid.seid,
|
||||||
|
sizeof(sess->smf_n4_f_seid.seid), sess);
|
||||||
|
|
||||||
ogs_list_add(&self.sess_list, sess);
|
ogs_list_add(&self.sess_list, sess);
|
||||||
|
|
||||||
|
@ -176,8 +189,10 @@ int upf_sess_remove(upf_sess_t *sess)
|
||||||
ogs_list_remove(&self.sess_list, sess);
|
ogs_list_remove(&self.sess_list, sess);
|
||||||
ogs_pfcp_sess_clear(&sess->pfcp);
|
ogs_pfcp_sess_clear(&sess->pfcp);
|
||||||
|
|
||||||
ogs_hash_set(self.sess_hash, &sess->smf_n4_seid,
|
ogs_hash_set(self.seid_hash, &sess->smf_n4_f_seid.seid,
|
||||||
sizeof(sess->smf_n4_seid), NULL);
|
sizeof(sess->smf_n4_f_seid.seid), NULL);
|
||||||
|
ogs_hash_set(self.f_seid_hash, &sess->smf_n4_f_seid,
|
||||||
|
sizeof(sess->smf_n4_f_seid), NULL);
|
||||||
|
|
||||||
if (sess->ipv4) {
|
if (sess->ipv4) {
|
||||||
ogs_hash_set(self.ipv4_hash, sess->ipv4->addr, OGS_IPV4_LEN, NULL);
|
ogs_hash_set(self.ipv4_hash, sess->ipv4->addr, OGS_IPV4_LEN, NULL);
|
||||||
|
@ -213,12 +228,26 @@ upf_sess_t *upf_sess_find(uint32_t index)
|
||||||
return ogs_pool_find(&upf_sess_pool, index);
|
return ogs_pool_find(&upf_sess_pool, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
upf_sess_t *upf_sess_find_by_cp_seid(uint64_t seid)
|
upf_sess_t *upf_sess_find_by_smf_n4_seid(uint64_t seid)
|
||||||
{
|
{
|
||||||
return (upf_sess_t *)ogs_hash_get(self.sess_hash, &seid, sizeof(seid));
|
return (upf_sess_t *)ogs_hash_get(self.seid_hash, &seid, sizeof(seid));
|
||||||
}
|
}
|
||||||
|
|
||||||
upf_sess_t *upf_sess_find_by_up_seid(uint64_t seid)
|
upf_sess_t *upf_sess_find_by_smf_n4_f_seid(ogs_pfcp_f_seid_t *f_seid)
|
||||||
|
{
|
||||||
|
struct {
|
||||||
|
uint64_t seid;
|
||||||
|
ogs_ip_t ip;
|
||||||
|
} key;
|
||||||
|
|
||||||
|
ogs_assert(f_seid);
|
||||||
|
ogs_assert(OGS_OK == ogs_pfcp_f_seid_to_ip(f_seid, &key.ip));
|
||||||
|
key.seid = f_seid->seid;
|
||||||
|
|
||||||
|
return (upf_sess_t *)ogs_hash_get(self.f_seid_hash, &key, sizeof(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
upf_sess_t *upf_sess_find_by_upf_n4_seid(uint64_t seid)
|
||||||
{
|
{
|
||||||
return upf_sess_find(seid);
|
return upf_sess_find(seid);
|
||||||
}
|
}
|
||||||
|
@ -252,7 +281,7 @@ upf_sess_t *upf_sess_add_by_message(ogs_pfcp_message_t *message)
|
||||||
}
|
}
|
||||||
f_seid->seid = be64toh(f_seid->seid);
|
f_seid->seid = be64toh(f_seid->seid);
|
||||||
|
|
||||||
sess = upf_sess_find_by_cp_seid(f_seid->seid);
|
sess = upf_sess_find_by_smf_n4_f_seid(f_seid);
|
||||||
if (!sess) {
|
if (!sess) {
|
||||||
sess = upf_sess_add(f_seid);
|
sess = upf_sess_add(f_seid);
|
||||||
if (!sess) return NULL;
|
if (!sess) return NULL;
|
||||||
|
@ -366,7 +395,7 @@ uint8_t upf_sess_set_ue_ip(upf_sess_t *sess,
|
||||||
|
|
||||||
ogs_info("UE F-SEID[CP:0x%lx UP:0x%lx] "
|
ogs_info("UE F-SEID[CP:0x%lx UP:0x%lx] "
|
||||||
"APN[%s] PDN-Type[%d] IPv4[%s] IPv6[%s]",
|
"APN[%s] PDN-Type[%d] IPv4[%s] IPv6[%s]",
|
||||||
(long)sess->upf_n4_seid, (long)sess->smf_n4_seid,
|
(long)sess->upf_n4_seid, (long)sess->smf_n4_f_seid.seid,
|
||||||
pdr->dnn, session_type,
|
pdr->dnn, session_type,
|
||||||
sess->ipv4 ? OGS_INET_NTOP(&sess->ipv4->addr, buf1) : "",
|
sess->ipv4 ? OGS_INET_NTOP(&sess->ipv4->addr, buf1) : "",
|
||||||
sess->ipv6 ? OGS_INET6_NTOP(&sess->ipv6->addr, buf2) : "");
|
sess->ipv6 ? OGS_INET6_NTOP(&sess->ipv6->addr, buf2) : "");
|
||||||
|
|
|
@ -45,7 +45,8 @@ extern int __upf_log_domain;
|
||||||
#define OGS_LOG_DOMAIN __upf_log_domain
|
#define OGS_LOG_DOMAIN __upf_log_domain
|
||||||
|
|
||||||
typedef struct upf_context_s {
|
typedef struct upf_context_s {
|
||||||
ogs_hash_t *sess_hash; /* hash table (F-SEID) */
|
ogs_hash_t *seid_hash; /* hash table (SEID) */
|
||||||
|
ogs_hash_t *f_seid_hash; /* hash table (F-SEID) */
|
||||||
ogs_hash_t *ipv4_hash; /* hash table (IPv4 Address) */
|
ogs_hash_t *ipv4_hash; /* hash table (IPv4 Address) */
|
||||||
ogs_hash_t *ipv6_hash; /* hash table (IPv6 Address) */
|
ogs_hash_t *ipv6_hash; /* hash table (IPv6 Address) */
|
||||||
|
|
||||||
|
@ -86,7 +87,10 @@ typedef struct upf_sess_s {
|
||||||
ogs_pfcp_sess_t pfcp;
|
ogs_pfcp_sess_t pfcp;
|
||||||
|
|
||||||
uint64_t upf_n4_seid; /* UPF SEID is dervied from INDEX */
|
uint64_t upf_n4_seid; /* UPF SEID is dervied from INDEX */
|
||||||
uint64_t smf_n4_seid; /* SMF SEID is received from Peer */
|
struct {
|
||||||
|
uint64_t seid;
|
||||||
|
ogs_ip_t ip;
|
||||||
|
} smf_n4_f_seid; /* SMF SEID is received from Peer */
|
||||||
|
|
||||||
/* APN Configuration */
|
/* APN Configuration */
|
||||||
ogs_pfcp_ue_ip_t *ipv4;
|
ogs_pfcp_ue_ip_t *ipv4;
|
||||||
|
@ -111,8 +115,9 @@ upf_sess_t *upf_sess_add(ogs_pfcp_f_seid_t *f_seid);
|
||||||
int upf_sess_remove(upf_sess_t *sess);
|
int upf_sess_remove(upf_sess_t *sess);
|
||||||
void upf_sess_remove_all(void);
|
void upf_sess_remove_all(void);
|
||||||
upf_sess_t *upf_sess_find(uint32_t index);
|
upf_sess_t *upf_sess_find(uint32_t index);
|
||||||
upf_sess_t *upf_sess_find_by_cp_seid(uint64_t seid);
|
upf_sess_t *upf_sess_find_by_smf_n4_seid(uint64_t seid);
|
||||||
upf_sess_t *upf_sess_find_by_up_seid(uint64_t seid);
|
upf_sess_t *upf_sess_find_by_smf_n4_f_seid(ogs_pfcp_f_seid_t *f_seid);
|
||||||
|
upf_sess_t *upf_sess_find_by_upf_n4_seid(uint64_t seid);
|
||||||
upf_sess_t *upf_sess_find_by_ipv4(uint32_t addr);
|
upf_sess_t *upf_sess_find_by_ipv4(uint32_t addr);
|
||||||
upf_sess_t *upf_sess_find_by_ipv6(uint32_t *addr6);
|
upf_sess_t *upf_sess_find_by_ipv6(uint32_t *addr6);
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ void upf_n4_handle_session_establishment_request(
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
ogs_pfcp_sess_clear(&sess->pfcp);
|
ogs_pfcp_sess_clear(&sess->pfcp);
|
||||||
ogs_pfcp_send_error_message(xact, sess ? sess->smf_n4_seid : 0,
|
ogs_pfcp_send_error_message(xact, sess ? sess->smf_n4_f_seid.seid : 0,
|
||||||
OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE,
|
OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE,
|
||||||
cause_value, offending_ie_value);
|
cause_value, offending_ie_value);
|
||||||
}
|
}
|
||||||
|
@ -432,7 +432,7 @@ void upf_n4_handle_session_modification_request(
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
ogs_pfcp_sess_clear(&sess->pfcp);
|
ogs_pfcp_sess_clear(&sess->pfcp);
|
||||||
ogs_pfcp_send_error_message(xact, sess ? sess->smf_n4_seid : 0,
|
ogs_pfcp_send_error_message(xact, sess ? sess->smf_n4_f_seid.seid : 0,
|
||||||
OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE,
|
OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE,
|
||||||
cause_value, offending_ie_value);
|
cause_value, offending_ie_value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,7 @@ int upf_pfcp_send_session_establishment_response(
|
||||||
|
|
||||||
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
||||||
h.type = OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE;
|
h.type = OGS_PFCP_SESSION_ESTABLISHMENT_RESPONSE_TYPE;
|
||||||
h.seid = sess->smf_n4_seid;
|
h.seid = sess->smf_n4_f_seid.seid;
|
||||||
|
|
||||||
n4buf = upf_n4_build_session_establishment_response(
|
n4buf = upf_n4_build_session_establishment_response(
|
||||||
h.type, sess, created_pdr, num_of_created_pdr);
|
h.type, sess, created_pdr, num_of_created_pdr);
|
||||||
|
@ -205,7 +205,7 @@ int upf_pfcp_send_session_modification_response(
|
||||||
|
|
||||||
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
||||||
h.type = OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE;
|
h.type = OGS_PFCP_SESSION_MODIFICATION_RESPONSE_TYPE;
|
||||||
h.seid = sess->smf_n4_seid;
|
h.seid = sess->smf_n4_f_seid.seid;
|
||||||
|
|
||||||
n4buf = upf_n4_build_session_modification_response(
|
n4buf = upf_n4_build_session_modification_response(
|
||||||
h.type, sess, created_pdr, num_of_created_pdr);
|
h.type, sess, created_pdr, num_of_created_pdr);
|
||||||
|
@ -231,7 +231,7 @@ int upf_pfcp_send_session_deletion_response(ogs_pfcp_xact_t *xact,
|
||||||
|
|
||||||
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
||||||
h.type = OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE;
|
h.type = OGS_PFCP_SESSION_DELETION_RESPONSE_TYPE;
|
||||||
h.seid = sess->smf_n4_seid;
|
h.seid = sess->smf_n4_f_seid.seid;
|
||||||
|
|
||||||
n4buf = upf_n4_build_session_deletion_response(h.type, sess);
|
n4buf = upf_n4_build_session_deletion_response(h.type, sess);
|
||||||
ogs_expect_or_return_val(n4buf, OGS_ERROR);
|
ogs_expect_or_return_val(n4buf, OGS_ERROR);
|
||||||
|
@ -275,7 +275,7 @@ int upf_pfcp_send_session_report_request(
|
||||||
|
|
||||||
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
memset(&h, 0, sizeof(ogs_pfcp_header_t));
|
||||||
h.type = OGS_PFCP_SESSION_REPORT_REQUEST_TYPE;
|
h.type = OGS_PFCP_SESSION_REPORT_REQUEST_TYPE;
|
||||||
h.seid = sess->smf_n4_seid;
|
h.seid = sess->smf_n4_f_seid.seid;
|
||||||
|
|
||||||
xact = ogs_pfcp_xact_local_create(sess->pfcp_node, sess_timeout, sess);
|
xact = ogs_pfcp_xact_local_create(sess->pfcp_node, sess_timeout, sess);
|
||||||
ogs_expect_or_return_val(xact, OGS_ERROR);
|
ogs_expect_or_return_val(xact, OGS_ERROR);
|
||||||
|
|
|
@ -185,7 +185,7 @@ void upf_pfcp_state_associated(ogs_fsm_t *s, upf_event_t *e)
|
||||||
ogs_assert(xact);
|
ogs_assert(xact);
|
||||||
|
|
||||||
if (message->h.seid_presence && message->h.seid != 0)
|
if (message->h.seid_presence && message->h.seid != 0)
|
||||||
sess = upf_sess_find_by_up_seid(message->h.seid);
|
sess = upf_sess_find_by_upf_n4_seid(message->h.seid);
|
||||||
|
|
||||||
switch (message->h.type) {
|
switch (message->h.type) {
|
||||||
case OGS_PFCP_HEARTBEAT_REQUEST_TYPE:
|
case OGS_PFCP_HEARTBEAT_REQUEST_TYPE:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "open5gs",
|
"name": "open5gs",
|
||||||
"version": "2.4.3",
|
"version": "2.4.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "open5gs",
|
"name": "open5gs",
|
||||||
"version": "2.4.3",
|
"version": "2.4.6",
|
||||||
"description": "Open5gs",
|
"description": "Open5gs",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "https://github.com/open5gs/open5gs/webui",
|
"repository": "https://github.com/open5gs/open5gs/webui",
|
||||||
|
|
Loading…
Reference in New Issue