forked from acouzens/open5gs
For safety, check TEID presence in GTP
This commit is contained in:
parent
d1f3439f93
commit
0891ee5b19
|
@ -509,7 +509,7 @@ void mme_state_operational(ogs_fsm_t *s, mme_event_t *e)
|
|||
* However in this case, the cause code shall not be set to
|
||||
* "Context not found".
|
||||
*/
|
||||
if (gtp_message.h.teid != 0) {
|
||||
if (gtp_message.h.teid_presence && gtp_message.h.teid != 0) {
|
||||
/* Cause is not "Context not found" */
|
||||
mme_ue = mme_ue_find_by_teid(gtp_message.h.teid);
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ void pgw_state_operational(ogs_fsm_t *s, pgw_event_t *e)
|
|||
* However in this case, the cause code shall not be set to
|
||||
* "Context not found".
|
||||
*/
|
||||
if (message->h.teid != 0) {
|
||||
if (message->h.teid_presence && message->h.teid != 0) {
|
||||
/* Cause is not "Context not found" */
|
||||
sess = pgw_sess_find_by_teid(message->h.teid);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ void sgw_state_operational(ogs_fsm_t *s, sgw_event_t *e)
|
|||
rv = ogs_gtp_parse_msg(&message, pkbuf);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
|
||||
if (message.h.teid != 0) {
|
||||
if (message.h.teid_presence && message.h.teid != 0) {
|
||||
/* Cause is not "Context not found" */
|
||||
sgw_ue = sgw_ue_find_by_teid(message.h.teid);
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ void sgw_state_operational(ogs_fsm_t *s, sgw_event_t *e)
|
|||
rv = ogs_gtp_parse_msg(&message, pkbuf);
|
||||
ogs_assert(rv == OGS_OK);
|
||||
|
||||
if (message.h.teid != 0) {
|
||||
if (message.h.teid_presence && message.h.teid != 0) {
|
||||
sess = sgw_sess_find_by_teid(message.h.teid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue