diff --git a/src/sgwc/s5c-handler.c b/src/sgwc/s5c-handler.c index f0ec8c877..b76440a9b 100644 --- a/src/sgwc/s5c-handler.c +++ b/src/sgwc/s5c-handler.c @@ -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, diff --git a/src/sgwc/sxa-handler.c b/src/sgwc/sxa-handler.c index a5704d384..ca8841288 100644 --- a/src/sgwc/sxa-handler.c +++ b/src/sgwc/sxa-handler.c @@ -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);