Module: kamailio
Branch: 5.7
Commit: 44130062640ccbbc7e796cc748d432fe3382c328
URL:
https://github.com/kamailio/kamailio/commit/44130062640ccbbc7e796cc748d432f…
Author: Stefan Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Committer: Stefan Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Date: 2023-07-05T13:56:26+03:00
ims_qos: check and log for NULL sessionId
(cherry picked from commit 1b291315b43da1148cee5f3821ddbe49b0c86b7f)
---
Modified: src/modules/ims_qos/rx_aar.c
---
Diff:
https://github.com/kamailio/kamailio/commit/44130062640ccbbc7e796cc748d432f…
Patch:
https://github.com/kamailio/kamailio/commit/44130062640ccbbc7e796cc748d432f…
---
diff --git a/src/modules/ims_qos/rx_aar.c b/src/modules/ims_qos/rx_aar.c
index 1c376c98008..0f7373915a1 100644
--- a/src/modules/ims_qos/rx_aar.c
+++ b/src/modules/ims_qos/rx_aar.c
@@ -149,6 +149,11 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa,
long elaps
LM_DBG("Success, received code: [%i] from PCRF for AAR request\n",
cdp_result);
counter_inc(ims_qos_cnts_h.successful_media_aars);
+ if(!aaa->sessionId) {
+ LM_ERR("NULL AAA sessionId from PCRF!\n");
+ goto error;
+ }
+
LM_DBG("Auth session ID [%.*s]", aaa->sessionId->data.len,
aaa->sessionId->data.s);
if(!data->aar_update) {
@@ -286,6 +291,12 @@ void async_aar_reg_callback(int is_timeout, void *param, AAAMessage
*aaa, long e
create_return_code(result);
goto done;
}
+
+ if(!aaa->sessionId) {
+ LM_ERR("NULL AAA sessionId from PCRF!\n");
+ goto error;
+ }
+
//need to set Rx auth data to say this session has been successfully opened
//This is used elsewhere to prevent acting on termination events when the session
has not been opened
//getting auth session