[AMF] Ignore unexpected PATCH method in gmm_state_authentication (#4074)

When the AMF receives a PATCH request for the registration API while in
the gmm_state_authentication state, it currently crashes because the
HTTP method is not handled. This appears to be a race condition.

To fix this, explicitly handle OGS_SBI_HTTP_METHOD_PATCH by ignoring the
message and logging an error, similar to the handling of other
unexpected SBI messages.
This commit is contained in:
Sukchan Lee
2025-09-16 06:36:15 +09:00
parent 994eaa2c9a
commit 8669094586

View File

@@ -2059,6 +2059,14 @@ void gmm_state_authentication(ogs_fsm_t *s, amf_event_t *e)
*/
ogs_error("[%s] Ignore SBI message", amf_ue->supi);
break;
CASE(OGS_SBI_HTTP_METHOD_PATCH)
/*
* Issue #4074
*
* We need to ignore this message in this state.
*/
ogs_error("[%s] Ignore SBI message", amf_ue->supi);
break;
DEFAULT
ogs_error("[%s] Invalid HTTP method [%s]",
amf_ue->suci, sbi_message->h.method);