Skip to content

Commit

Permalink
siptrace: allow capturing on any port
Browse files Browse the repository at this point in the history
reported by Eric Tamme from OnSIP

(cherry picked from commit b7f9ca3)
  • Loading branch information
razvancrainea committed Sep 15, 2017
1 parent 21df6c8 commit 24ffc20
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions modules/siptrace/siptrace.c
Expand Up @@ -2377,17 +2377,8 @@ static int pipport2su (str *sproto, str *ip, unsigned short port,
return -1;
}

if (port == 0) {
if (port == 0)
port = SIP_PORT;
}
else{
/*the address contains a port number*/
if (port<1024 || port>65535)
{
LM_ERR("invalid port number; must be in [1024,65536]\n");
return -1;
}
}
LM_DBG("proto %d, host %.*s , port %d \n",*proto, ip->len, ip->s, port);

/* now IPv6 address has no brakets. It should be fixed! */
Expand Down

0 comments on commit 24ffc20

Please sign in to comment.