fix the SGW-C crash
This commit is contained in:
parent
a46be09a6f
commit
4d2b1f7e76
|
@ -169,6 +169,7 @@ void sgwc_gtp_send_downlink_data_notification(
|
|||
ogs_assert(sess);
|
||||
sgwc_ue = bearer->sgwc_ue;
|
||||
ogs_assert(sgwc_ue);
|
||||
ogs_assert(sgwc_ue->gnode);
|
||||
|
||||
ogs_debug("Downlink Data Notification");
|
||||
ogs_debug(" MME_S11_TEID[%d] SGW_S11_TEID[%d]",
|
||||
|
|
|
@ -250,7 +250,9 @@ void sgwc_s11_handle_modify_bearer_request(
|
|||
if (sgwc_ue && cause.value == OGS_GTP_CAUSE_REQUEST_ACCEPTED) {
|
||||
bearer = sgwc_bearer_find_by_ue_ebi(sgwc_ue,
|
||||
req->bearer_contexts_to_be_modified.eps_bearer_id.u8);
|
||||
ogs_assert(bearer);
|
||||
if (!bearer)
|
||||
ogs_error("Unknown EPS Bearer ID[%d]",
|
||||
req->bearer_contexts_to_be_modified.eps_bearer_id.u8);
|
||||
}
|
||||
|
||||
if (!bearer) {
|
||||
|
|
|
@ -857,6 +857,7 @@ void sgwc_sxa_handle_session_report_request(
|
|||
sgwc_sess_t *sess, ogs_pfcp_xact_t *pfcp_xact,
|
||||
ogs_pfcp_session_report_request_t *pfcp_req)
|
||||
{
|
||||
sgwc_ue_t *sgwc_ue = NULL;
|
||||
sgwc_bearer_t *bearer = NULL;
|
||||
sgwc_tunnel_t *tunnel = NULL;
|
||||
|
||||
|
@ -887,20 +888,25 @@ void sgwc_sxa_handle_session_report_request(
|
|||
}
|
||||
|
||||
ogs_assert(sess);
|
||||
sgwc_ue = sess->sgwc_ue;
|
||||
ogs_assert(sgwc_ue);
|
||||
|
||||
report_type.value = pfcp_req->report_type.u8;
|
||||
if (report_type.downlink_data_report) {
|
||||
if (pfcp_req->downlink_data_report.presence &&
|
||||
pfcp_req->downlink_data_report.pdr_id.presence) {
|
||||
if (sgwc_ue->gnode) {
|
||||
report_type.value = pfcp_req->report_type.u8;
|
||||
if (report_type.downlink_data_report) {
|
||||
if (pfcp_req->downlink_data_report.presence &&
|
||||
pfcp_req->downlink_data_report.pdr_id.presence) {
|
||||
|
||||
pdr_id = pfcp_req->downlink_data_report.pdr_id.u16;
|
||||
pdr_id = pfcp_req->downlink_data_report.pdr_id.u16;
|
||||
|
||||
ogs_list_for_each(&sess->bearer_list, bearer) {
|
||||
ogs_list_for_each(&bearer->tunnel_list, tunnel) {
|
||||
ogs_assert(tunnel->pdr);
|
||||
if (tunnel->pdr->id == pdr_id) {
|
||||
sgwc_gtp_send_downlink_data_notification(bearer, pfcp_xact);
|
||||
return;
|
||||
ogs_list_for_each(&sess->bearer_list, bearer) {
|
||||
ogs_list_for_each(&bearer->tunnel_list, tunnel) {
|
||||
ogs_assert(tunnel->pdr);
|
||||
if (tunnel->pdr->id == pdr_id) {
|
||||
sgwc_gtp_send_downlink_data_notification(
|
||||
bearer, pfcp_xact);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,9 +218,11 @@ static void _gtpv1_u_recv_cb(short when, ogs_socket_t fd, void *data)
|
|||
subnet = sess->ipv6->subnet;
|
||||
|
||||
if (!subnet) {
|
||||
#if 0 /* It's redundant log message */
|
||||
ogs_error("[DROP] Cannot find subnet V:%d, IPv4:%p, IPv6:%p",
|
||||
ip_h->ip_v, sess->ipv4, sess->ipv6);
|
||||
ogs_log_hexdump(OGS_LOG_ERROR, pkbuf->data, pkbuf->len);
|
||||
#endif
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue