[asterisk-bugs] [Asterisk 0018545]: IAX Incorrectly reports IAX/Registry astdb host:port invalid

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Dec 28 21:15:50 UTC 2010


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18545 
====================================================================== 
Reported By:                jcovert
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18545
Category:                   Channels/chan_iax2
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.8.1.1 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-12-28 15:15 CST
Last Modified:              2010-12-28 15:15 CST
====================================================================== 
Summary:                    IAX Incorrectly reports IAX/Registry astdb host:port
invalid
Description: 
When the IAX2 channel reviews the registration database, messages such as
the following are reported:

[Dec 28 15:36:32] NOTICE[15998]: chan_iax2.c:8618 reg_source_db:
IAX/Registry astdb host:port invalid - '192.168.0.17:4569

However, this is perfectly valid.  This is caused by an incorrect test:

       if (ast_sockaddr_parse(&p->addr, data, PARSE_PORT_REQUIRE)) {
               ast_log(LOG_NOTICE, "IAX/Registry astdb host:port invalid -
'%s'\n", data);
               return;
       }

As documented in netsock2.h:

 * \retval 0 Failure
 * \retval non-zero The number of elements in addrs array.

(which is only partially true: if there were more then 1 elements in the
array, a warning would be printed and retval would be forced to 1)

In any case, the sense of the test needs to be reversed.  A patch is
attached.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-28 15:15 jcovert        New Issue                                    
2010-12-28 15:15 jcovert        Asterisk Version          => 1.8.1.1         
2010-12-28 15:15 jcovert        Regression                => No              
2010-12-28 15:15 jcovert        SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list