Skip to content

Commit f3cb92d

Browse files
committed
[rr] Fix handling on maddr param in RURI
If present in RURI, maddr value should be considered (instead of host part) for testing if RURI points (as domain) to OpenSIPS or not (the is_myselg() test)
1 parent 27cd5d7 commit f3cb92d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/rr/loose.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,13 @@ static inline int is_myself(struct sip_uri* _uri)
232232
int ret;
233233
unsigned short port;
234234
unsigned short proto;
235+
str *host;
235236

236237
port = get_uri_port(_uri, &proto);
238+
host = (_uri->maddr.s && _uri->maddr_val.s) ?
239+
&_uri->maddr_val : &_uri->host;
237240

238-
ret = check_self(&_uri->host, port, proto);
241+
ret = check_self( host, port, proto);
239242
if (ret < 0) return 0;
240243

241244
#ifdef ENABLE_USER_CHECK

0 commit comments

Comments
 (0)