From: Michael L. Young Date: Wed, 21 Aug 2013 02:09:21 +0000 (+0000) Subject: Fix Not Storing Current Incoming Recv Address X-Git-Tag: 1.8.24.0-rc1~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8223968351afcbddb6ed3a378dc9d34f9e933d4b;p=thirdparty%2Fasterisk.git Fix Not Storing Current Incoming Recv Address In 1.8, r384779 introduced a regression by retrieving an old dialog and keeping the old recv address since recv was already set. This has caused a problem when a proxy is involved since responses to incoming requests from the proxy server, after an outbound call is established, are never sent to the correct recv address. In 11, r382322 introduced this regression. The fix is to revert that change and always store the recv address on incoming requests. Thank you Walter Doekes for helping to point out this error and Mark Michelson for your input/review of the fix. (closes issue ASTERISK-22071) Reported by: Alex Zarubin Tested by: Alex Zarubin, Karsten Wemheuer Patches: asterisk-22071-store-recvd-address.diff by Michael L. Young (license 5026) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@397204 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e2c5d0700f..11838711fe 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -26137,9 +26137,7 @@ static int handle_request_do(struct sip_request *req, struct ast_sockaddr *addr) copy_socket_data(&p->socket, &req->socket); - if (ast_sockaddr_isnull(&p->recv)) { /* This may already be set before getting here */ - ast_sockaddr_copy(&p->recv, addr); - } + ast_sockaddr_copy(&p->recv, addr); /* if we have an owner, then this request has been authenticated */ if (p->owner) {