Skip to content

Commit

Permalink
[rr] Fix handling on maddr param in RURI
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
bogdan-iancu committed Nov 15, 2022
1 parent 27cd5d7 commit f3cb92d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/rr/loose.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,13 @@ static inline int is_myself(struct sip_uri* _uri)
int ret;
unsigned short port;
unsigned short proto;
str *host;

port = get_uri_port(_uri, &proto);
host = (_uri->maddr.s && _uri->maddr_val.s) ?
&_uri->maddr_val : &_uri->host;

ret = check_self(&_uri->host, port, proto);
ret = check_self( host, port, proto);
if (ret < 0) return 0;

#ifdef ENABLE_USER_CHECK
Expand Down

0 comments on commit f3cb92d

Please sign in to comment.