Skip to content

Commit

Permalink
[mme] store paging info during context release (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencersevilla committed Jan 25, 2024
1 parent 0c80ab4 commit c6170ed
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mme/mme-gtp-path.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ int mme_gtp_send_downlink_data_notification_ack(
ogs_warn("GTP transaction(NOTIFY) has already been removed");
return OGS_OK;
}
if (xact->step != 1) {
ogs_error("Trying to re-send downlink data notification ack?!?");
return OGS_OK;
}

mme_ue = bearer->mme_ue;
ogs_assert(mme_ue);
sgw_ue = mme_ue->sgw_ue;
Expand Down
5 changes: 5 additions & 0 deletions src/mme/mme-s11-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,11 @@ void mme_s11_handle_downlink_data_notification(
enb_ue_t *enb_ue = enb_ue_cycle(mme_ue->enb_ue);
ogs_assert(enb_ue);

mme_ue->paging.data = bearer;
// we are not calling MME_STORE_PAGING_INFO because we
// have not yet started paging, but we still need to keep
// a pointer to the relevant bearer to build the ACK later

r = s1ap_send_ue_context_release_command(enb_ue,
S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release,
S1AP_UE_CTX_REL_S1_PAGING, 0);
Expand Down
9 changes: 9 additions & 0 deletions src/mme/s1ap-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,15 @@ void s1ap_handle_ue_context_release_action(enb_ue_t *enb_ue)
}
enb_ue_unlink(mme_ue);

mme_bearer_t *bearer = mme_bearer_cycle(mme_ue->paging.data);
if (!bearer) {
ogs_error("Bearer is outdated, cannot page");
MME_CLEAR_PAGING_INFO(mme_ue);
return;
}

MME_STORE_PAGING_INFO(mme_ue,
MME_PAGING_TYPE_DOWNLINK_DATA_NOTIFICATION, bearer);
r = s1ap_send_paging(mme_ue, S1AP_CNDomain_ps);
ogs_expect(r == OGS_OK);
ogs_assert(r != OGS_ERROR);
Expand Down

0 comments on commit c6170ed

Please sign in to comment.