Browse code

rr: catch uri without host part when matching local addresses

- can happen for tel or urn uri

Daniel-Constantin Mierla authored on 17/02/2021 11:15:55
Showing 1 changed files
... ...
@@ -122,6 +122,11 @@ static inline int is_myself(sip_uri_t *_puri)
122 122
 {
123 123
 	int ret;
124 124
 
125
+	if(_puri->host.len==0) {
126
+		/* catch uri without host (e.g., tel uri) */
127
+		return 0;
128
+	}
129
+
125 130
 	ret = check_self(&_puri->host,
126 131
 			_puri->port_no?_puri->port_no:SIP_PORT, 0);/* match all protos*/
127 132
 	if (ret < 0) return 0;