[asterisk-bugs] [Asterisk 0018785]: [patch] Regression after r297603 (Improve handling of REGISTER requests with multiple contact headers.)

Asterisk Bug Tracker noreply at bugs.digium.com
Fri May 6 13:03:14 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18785 
====================================================================== 
Reported By:                pnlarsson
Assigned To:                rmudgett
====================================================================== 
Project:                    Asterisk
Issue ID:                   18785
Category:                   Channels/chan_sip/Registration
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Target Version:             1.8.6
Asterisk Version:           1.4.39.1 
JIRA:                       SWP-3080 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2011-02-10 10:16 CST
Last Modified:              2011-05-06 13:03 CDT
====================================================================== 
Summary:                    [patch] Regression after r297603 (Improve handling
of REGISTER requests with multiple contact headers.)
Description: 
i found that i could not register after upgrading to 1.4.39. After a bit of
searching around i found that this:

REGISTER sip:XX.XX.XX.XX:5060 SIP/2.0
Via: SIP/2.0/UDP YY.YY.YY.YY:5060;branch=z9hG4bK0000040d;rport
Max-Forwards: 70
To: sip:abc at XX.XX.XX.XX
From: sip:abc at XX.XX.XX.XX;tag=419
Call-ID: 00003d44-07219b5e465f10008e9f0080f0b320bc at YY.YY.YY.YY
CSeq: 2 REGISTER
Contact: *
Expires: 0
Authorization: Digest realm="asterisk", nonce="4aa4a0fb", algorithm=MD5,
uri="sip:XX.XX.XX.XX:5060", username="abc",
response="71e6f91ca165a5a59b0de8fe53a5f9c4"
Allow: INVITE,ACK,CANCEL,BYE,PRACK,OPTIONS,REGISTER,INFO,UPDATE
User-Agent: Panasonic-MPR10-VSIPGW/V2.0501
Content-Length: 0

fails with:

[Feb 10 14:50:19] WARNING[2232] chan_sip.c: Failed to parse contact info
[Feb 10 14:50:19] VERBOSE[2232] logger.c:
<--- Transmitting (NAT) to YY.YY.YY.YY:5060 --->
SIP/2.0 400 Bad Request

this works before r297603 and the commit msg:

The changes here attempt to more strictly follow RFC 3261 section 10.3.
Basically the following will now cause a 400 Bad Response to be returned,
if:
- multiple Contact headers are present with one set to expire all bindings
("*")
- wildcard parameter is specified for Contact without Expires header or
Expires
  header is not set to zero.

This line looks interesting, if single_binding_found is set we fail even
if expires is 0:

if (wildcard_found && (ast_strlen_zero(expires) || expiry != 0 ||
single_binding_found)) {
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0018640 [patch] Potential malfunction due to un...
has duplicate       0018982 Unitialized single_binding_found
====================================================================== 

---------------------------------------------------------------------- 
 (0134585) svnbot (reporter) - 2011-05-06 13:03
 https://issues.asterisk.org/view.php?id=18785#c134585 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 317720

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

------------------------------------------------------------------------
r317720 | rmudgett | 2011-05-06 13:03:13 -0500 (Fri, 06 May 2011) | 18
lines

Merged revisions 317719 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r317719 | rmudgett | 2011-05-06 12:59:05 -0500 (Fri, 06 May 2011) | 11
lines
  
  Regression after r297603 (Improve handling of REGISTER requests with
multiple contact headers.) 
  
  Uninitialized variable.
  
  (issue https://issues.asterisk.org/view.php?id=18640)
  
  (closes issue https://issues.asterisk.org/view.php?id=18785)
  Reported by: pnlarsson
  Patches:
        issue18785_enegaard.patch uploaded by enegaard (license 1197)
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-06 13:03 svnbot         Checkin                                      
2011-05-06 13:03 svnbot         Note Added: 0134585                          
======================================================================




More information about the asterisk-bugs mailing list