[Asterisk-code-review] Fix port parsing for IPv6 addresses in SIP Via headers. (asterisk[11.20])
Florian Sauerteig
asteriskteam at digium.com
Tue Oct 6 12:17:09 CDT 2015
Florian Sauerteig has uploaded a new change for review.
https://gerrit.asterisk.org/1389
Change subject: Fix port parsing for IPv6 addresses in SIP Via headers.
......................................................................
Fix port parsing for IPv6 addresses in SIP Via headers.
Change-Id: I8602d6f2260fc406311759a34e7bd8d97ce4ffb2
---
M channels/sip/reqresp_parser.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/89/1389/1
diff --git a/channels/sip/reqresp_parser.c b/channels/sip/reqresp_parser.c
index 42bb04d..9b435d0 100644
--- a/channels/sip/reqresp_parser.c
+++ b/channels/sip/reqresp_parser.c
@@ -2323,7 +2323,7 @@
/* store the port, we have to handle ipv6 addresses containing ':'
* characters gracefully */
- if (((parm = strchr(v->sent_by, ']')) && *(++parm) == ':') || (parm = strchr(v->sent_by, ':'))) {
+ if (((parm = strchr(v->sent_by, ']')) && *(++parm) == ':') || (!(parm = strchr(v->sent_by, ']')) && (parm = strchr(v->sent_by, ':')))) {
char *endptr;
v->port = strtol(++parm, &endptr, 10);
--
To view, visit https://gerrit.asterisk.org/1389
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8602d6f2260fc406311759a34e7bd8d97ce4ffb2
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11.20
Gerrit-Owner: Florian Sauerteig <ffs at ccn.net>
More information about the asterisk-code-review
mailing list