Module: kamailio
Branch: master
Commit: 81cd9c5d6934392cafd4b73541a19dbfa4b553f9
URL:
https://github.com/kamailio/kamailio/commit/81cd9c5d6934392cafd4b73541a19db…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-02-17T12:15:55+01:00
rr: catch uri without host part when matching local addresses
- can happen for tel or urn uri
---
Modified: src/modules/rr/loose.c
---
Diff:
https://github.com/kamailio/kamailio/commit/81cd9c5d6934392cafd4b73541a19db…
Patch:
https://github.com/kamailio/kamailio/commit/81cd9c5d6934392cafd4b73541a19db…
---
diff --git a/src/modules/rr/loose.c b/src/modules/rr/loose.c
index cfccfffa50..f1cbe1b629 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;