Module: kamailio
Branch: 5.4
Commit: 908acb8f0995d10b1ed9334fc7b81166b14ab8cc
URL:
https://github.com/kamailio/kamailio/commit/908acb8f0995d10b1ed9334fc7b8116…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-03-01T18:30:33+01:00
rr: catch uri without host part when matching local addresses
- can happen for tel or urn uri
(cherry picked from commit 81cd9c5d6934392cafd4b73541a19dbfa4b553f9)
---
Modified: src/modules/rr/loose.c
---
Diff:
https://github.com/kamailio/kamailio/commit/908acb8f0995d10b1ed9334fc7b8116…
Patch:
https://github.com/kamailio/kamailio/commit/908acb8f0995d10b1ed9334fc7b8116…
---
diff --git a/src/modules/rr/loose.c b/src/modules/rr/loose.c
index 0ba6ad5e5a..9bf8388ca5 100644
--- a/src/modules/rr/loose.c
+++ b/src/modules/rr/loose.c
@@ -122,6 +122,11 @@ static inline int is_myself(sip_uri_t *_puri)
{
int ret;
+ if(_puri->host.len==0) {
+ /* catch uri without host (e.g., tel uri) */
+ return 0;
+ }
+
ret = check_self(&_puri->host,
_puri->port_no?_puri->port_no:SIP_PORT, 0);/* match all protos*/
if (ret < 0) return 0;