[SGWC] Update remote PGW GTPv2-C address (#1560)

In Create Sesion Response, we updated remote PGW GTPv2-C address.
This commit is contained in:
Sukchan Lee 2022-05-28 17:06:36 +09:00
parent 78b1dc77ff
commit b6f2146594
2 changed files with 16 additions and 0 deletions

View File

@ -77,6 +77,7 @@ void sgwc_s5c_handle_create_session_response(
ogs_gtp2_create_session_response_t *rsp = NULL;
ogs_gtp_xact_t *s11_xact = NULL;
ogs_gtp_node_t *pgw = NULL;
ogs_assert(gtpbuf);
ogs_assert(message);
@ -261,6 +262,20 @@ void sgwc_s5c_handle_create_session_response(
ogs_assert(pgw_s5c_teid);
sess->pgw_s5c_teid = be32toh(pgw_s5c_teid->teid);
pgw = ogs_gtp_node_find_by_f_teid(&sgwc_self()->pgw_s5c_list, pgw_s5c_teid);
if (!pgw) {
pgw = ogs_gtp_node_add_by_f_teid(
&sgwc_self()->pgw_s5c_list,
pgw_s5c_teid, ogs_gtp_self()->gtpc_port);
ogs_assert(pgw);
rv = ogs_gtp_connect(
ogs_gtp_self()->gtpc_sock, ogs_gtp_self()->gtpc_sock6, pgw);
ogs_assert(rv == OGS_OK);
}
/* Setup GTP Node */
OGS_SETUP_GTP_NODE(sess, pgw);
ogs_assert(OGS_OK ==
sgwc_pfcp_send_session_modification_request(
sess, s11_xact, gtpbuf,

View File

@ -306,6 +306,7 @@ void sgwc_sxa_handle_session_establishment_response(
ogs_assert(up_f_seid);
sess->sgwu_sxa_seid = be64toh(up_f_seid->seid);
/* Receive Control Plane(UL) : PGW-S5C */
pgw_s5c_teid = create_session_request->
pgw_s5_s8_address_for_control_plane_or_pmip.data;
ogs_assert(pgw_s5c_teid);