From: Razvan Crainea <razvan@opensips.org>
Date: Fri, 15 Sep 2017 17:13:41 +0300
Subject: [PATCH] siptrace: allow capturing on any port
reported by Eric Tamme from OnSIP
(cherry picked from commit b7f9ca3316f4d6c740fc62599a55bae97026efbd)
diff --git a/modules/siptrace/siptrace.c b/modules/siptrace/siptrace.c
index 73b7b3cf9..ddc83eda9 100644
--- a/modules/siptrace/siptrace.c
+++ b/modules/siptrace/siptrace.c
@@ -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! */