Skip to content

Commit

Permalink
[CENNSO-1443] fix: do not crash when timer expires on deleted session (
Browse files Browse the repository at this point in the history
  • Loading branch information
demo-exe authored Jan 10, 2024
1 parent 996e0c4 commit e4738e2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions upf/upf_pfcp_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,11 @@ request_t1_expired (u32 seq_no)
ASSERT (req->flags.is_stopped == 0);
req->timer = ~0;

// handle edge case: timer expired in this iteration
// TODO: this should not be needed after multithreading
if (!req->data)
return;

upf_debug ("Msg Seq No: %u, %p, n1 %u\n", req->seq_no, req, req->n1);

/* make sure to resent reports to new peer if smfset peer is changed */
Expand All @@ -537,10 +542,10 @@ request_t1_expired (u32 seq_no)
return;
}

u8 type = pfcp_msg_type (req->data);

if (--req->n1 != 0)
{
u8 type = pfcp_msg_type (req->data);

/*
FIXME: here in pool_is_free_index we check for node index which can be
reused as soon as node goes back. Instead we should stop all requests
Expand Down Expand Up @@ -568,7 +573,6 @@ request_t1_expired (u32 seq_no)
}
else
{
u8 type = pfcp_msg_type (req->data);
u32 node = req->node;

upf_debug ("abort...\n");
Expand Down

0 comments on commit e4738e2

Please sign in to comment.