[sr-dev] git:master:79c4c7d0: dialog: don't do nothing on timeout if dialog is not local
Daniel-Constantin Mierla
miconda at gmail.com
Fri Feb 11 15:57:22 CET 2022
Module: kamailio
Branch: master
Commit: 79c4c7d0c4de2b15c68e07380a106544f2e27dbe
URL: https://github.com/kamailio/kamailio/commit/79c4c7d0c4de2b15c68e07380a106544f2e27dbe
Author: Riccardo Villa <riccardo.villa at netaxis.be>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-02-11T15:57:17+01:00
dialog: don't do nothing on timeout if dialog is not local
---
Modified: src/modules/dialog/dlg_handlers.c
---
Diff: https://github.com/kamailio/kamailio/commit/79c4c7d0c4de2b15c68e07380a106544f2e27dbe.diff
Patch: https://github.com/kamailio/kamailio/commit/79c4c7d0c4de2b15c68e07380a106544f2e27dbe.patch
---
diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c
index 3f8adefb79..422a714daf 100644
--- a/src/modules/dialog/dlg_handlers.c
+++ b/src/modules/dialog/dlg_handlers.c
@@ -1581,6 +1581,16 @@ void dlg_ontimeout(struct dlg_tl *tl)
dlg = ((struct dlg_cell*)((char *)(tl) -
(unsigned long)(&((struct dlg_cell*)0)->tl)));
+ if (dlg->bind_addr[0] == NULL) {
+ LM_DBG("skipping dialog without bind address\n");
+ return 0;
+ }
+
+ if (lookup_local_socket(&(dlg->bind_addr[0]->sock_str)) == NULL) {
+ LM_DBG("skipping non local dialog\n");
+ return 0;
+ }
+
/* mark dialog as expired */
dlg->dflags |= DLG_FLAG_EXPIRED;
More information about the sr-dev
mailing list