[Asterisk-code-review] res pjsip transport websocket: Properly set src name for IPv6 (asterisk[13])
Sean Bright
asteriskteam at digium.com
Tue Aug 21 14:01:37 CDT 2018
Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/9984
Change subject: res_pjsip_transport_websocket: Properly set src_name for IPv6
......................................................................
res_pjsip_transport_websocket: Properly set src_name for IPv6
SIP responses over WebSockets when the client is using IPv6 have invalid
Via headers according to RFC 3261. The 'received' header parameter
should not be wrapped in brackets if it is an IPv6 address.
See also: https://github.com/onsip/SIP.js/pull/594
Change-Id: I8ea9d289901b837512bee2ca2535e3dc14f04d77
---
M res/res_pjsip_transport_websocket.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/84/9984/1
diff --git a/res/res_pjsip_transport_websocket.c b/res/res_pjsip_transport_websocket.c
index f4c03b0..09dc3ad 100644
--- a/res/res_pjsip_transport_websocket.c
+++ b/res/res_pjsip_transport_websocket.c
@@ -293,7 +293,7 @@
pj_sockaddr_parse(pj_AF_UNSPEC(), 0, pj_cstr(&buf, ast_sockaddr_stringify(ast_websocket_remote_address(session))), &rdata->pkt_info.src_addr);
rdata->pkt_info.src_addr_len = sizeof(rdata->pkt_info.src_addr);
- pj_ansi_strcpy(rdata->pkt_info.src_name, ast_sockaddr_stringify_host(ast_websocket_remote_address(session)));
+ pj_ansi_strcpy(rdata->pkt_info.src_name, ast_sockaddr_stringify_fmt(ast_websocket_remote_address(session), AST_SOCKADDR_STR_ADDR));
rdata->pkt_info.src_port = ast_sockaddr_port(ast_websocket_remote_address(session));
recvd = pjsip_tpmgr_receive_packet(rdata->tp_info.transport->tpmgr, rdata);
--
To view, visit https://gerrit.asterisk.org/9984
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ea9d289901b837512bee2ca2535e3dc14f04d77
Gerrit-Change-Number: 9984
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180821/d2fefcc2/attachment.html>
More information about the asterisk-code-review
mailing list