[MME] Fixed GTP transaction crash (#1696)

This commit is contained in:
Sukchan Lee 2022-08-19 17:23:10 +09:00
parent a9694d6474
commit 909f407c20
1 changed files with 16 additions and 4 deletions

View File

@ -360,7 +360,10 @@ int mme_gtp_send_create_bearer_response(
sgw_ue = mme_ue->sgw_ue;
ogs_assert(sgw_ue);
xact = ogs_gtp_xact_cycle(bearer->create.xact);
ogs_assert(xact);
if (!xact) {
ogs_warn("GTP transaction(CREATE) has already been removed");
return OGS_OK;
}
memset(&h, 0, sizeof(ogs_gtp2_header_t));
h.type = OGS_GTP2_CREATE_BEARER_RESPONSE_TYPE;
@ -396,7 +399,10 @@ int mme_gtp_send_update_bearer_response(
sgw_ue = mme_ue->sgw_ue;
ogs_assert(sgw_ue);
xact = ogs_gtp_xact_cycle(bearer->update.xact);
ogs_assert(xact);
if (!xact) {
ogs_warn("GTP transaction(UPDATE) has already been removed");
return OGS_OK;
}
memset(&h, 0, sizeof(ogs_gtp2_header_t));
h.type = OGS_GTP2_UPDATE_BEARER_RESPONSE_TYPE;
@ -432,7 +438,10 @@ int mme_gtp_send_delete_bearer_response(
sgw_ue = mme_ue->sgw_ue;
ogs_assert(sgw_ue);
xact = ogs_gtp_xact_cycle(bearer->delete.xact);
ogs_assert(xact);
if (!xact) {
ogs_warn("GTP transaction(DELETE) has already been removed");
return OGS_OK;
}
memset(&h, 0, sizeof(ogs_gtp2_header_t));
h.type = OGS_GTP2_DELETE_BEARER_RESPONSE_TYPE;
@ -544,7 +553,10 @@ int mme_gtp_send_downlink_data_notification_ack(
ogs_assert(bearer);
xact = ogs_gtp_xact_cycle(bearer->notify.xact);
ogs_assert(xact);
if (!xact) {
ogs_warn("GTP transaction(NOTIFY) has already been removed");
return OGS_OK;
}
mme_ue = bearer->mme_ue;
ogs_assert(mme_ue);
sgw_ue = mme_ue->sgw_ue;