[asterisk-bugs] [Asterisk 0013823]: Response to REGISTER is sent to wrong address when using rport

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 28 08:54:17 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=13823 
====================================================================== 
Reported By:                dimas
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   13823
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Target Version:             1.4.27
Asterisk Version:           1.4.21.2 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-11-02 12:08 CST
Last Modified:              2009-05-28 08:54 CDT
====================================================================== 
Summary:                    Response to REGISTER is sent to wrong address when
using rport
Description: 
I have client behind NAT. 
when client (10.0.0.17) sends REGISTER request, it puts rport into Via
header. check_via notices that and sets SIP_NAT_ROUTE to the &p->flags[0] -
note the log line:

Sending to 192.168.7.211 : 5079 (NAT)

however the register_verify function later does 
  ast_copy_flags(&p->flags[0], &peer->flags[0], SIP_NAT); 
effectively overwritting the value with SIP_NAT_RFC3581. And finally,
check_auth send response back to client to the wrong address which is
visible from the log line 

<--- Transmitting (no NAT) to 10.0.0.17:5079 --->

====================================================================== 

---------------------------------------------------------------------- 
 (0105634) svnbot (reporter) - 2009-05-28 08:54
 https://issues.asterisk.org/view.php?id=13823#c105634 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 197471

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r197471 | file | 2009-05-28 08:54:16 -0500 (Thu, 28 May 2009) | 22 lines

Merged revisions 197467 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r197467 | file | 2009-05-28 10:47:45 -0300 (Thu, 28 May 2009) | 15 lines
  
  Merged revisions 197466 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r197466 | file | 2009-05-28 10:44:58 -0300 (Thu, 28 May 2009) | 8
lines
    
    Fix a bug where the flag indicating the presence of rport would get
overwritten by the nat setting.
    
    The presence of rport is now stored as a separate flag. Once the
dialog is setup and authenticated
    (or it passes through unauthenticated) the proper nat flag is set.
    
    (closes issue https://issues.asterisk.org/view.php?id=13823)
    Reported by: dimas
  ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=197471 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-28 08:54 svnbot         Checkin                                      
2009-05-28 08:54 svnbot         Note Added: 0105634                          
======================================================================




More information about the asterisk-bugs mailing list