Skip to content

Commit

Permalink
MME: Gn: Fill PDP Context requested from SGSN with IP allocated by SMF
Browse files Browse the repository at this point in the history
  • Loading branch information
pespin committed May 21, 2024
1 parent bbfa2ea commit b67f8ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mme/mme-gn-build.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ static void build_qos_profile_from_session(ogs_gtp1_qos_profile_decoded_t *qos_p
static int sess_fill_pdp_context_decoded(mme_sess_t *sess, ogs_gtp1_pdp_context_decoded_t *pdpctx_dec)
{
mme_bearer_t *bearer = NULL;
int rv;

*pdpctx_dec = (ogs_gtp1_pdp_context_decoded_t){
.ea = OGS_GTP1_PDPCTX_EXT_EUA_NO,
Expand All @@ -156,14 +157,17 @@ static int sess_fill_pdp_context_decoded(mme_sess_t *sess, ogs_gtp1_pdp_context_
.receive_npdu_nr = 0,
.ul_teic = sess->pgw_s5c_teid,
.pdp_type_org = OGS_PDP_EUA_ORG_IETF,
.pdp_type_num = {sess->session->session_type, },
.pdp_address = {sess->session->ue_ip, },
.pdp_type_num = {sess->session->paa.session_type, },
.ggsn_address_c = sess->pgw_s5c_ip,
.trans_id = sess->pti,
};

ogs_cpystrn(pdpctx_dec->apn, sess->session->name, sizeof(pdpctx_dec->apn));

rv = ogs_paa_to_ip(&sess->session->paa, &pdpctx_dec->pdp_address[0]);
if (rv != OGS_OK)
return rv;

ogs_list_for_each(&sess->bearer_list, bearer) {
pdpctx_dec->nsapi = bearer->ebi; /* 3GPP TS 23.401 5.2.1, TS 23.060 14.4 */
pdpctx_dec->sapi = 3; /* FIXME. Using 3 = default for now. Maybe use 0 = UNASSIGNED ?*/
Expand Down

0 comments on commit b67f8ac

Please sign in to comment.