Module: kamailio Branch: master Commit: 79c4c7d0c4de2b15c68e07380a106544f2e27dbe URL: https://github.com/kamailio/kamailio/commit/79c4c7d0c4de2b15c68e07380a106544...
Author: Riccardo Villa riccardo.villa@netaxis.be Committer: Daniel-Constantin Mierla miconda@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/79c4c7d0c4de2b15c68e07380a106544... Patch: https://github.com/kamailio/kamailio/commit/79c4c7d0c4de2b15c68e07380a106544...
---
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;