[asterisk-bugs] [Asterisk 0016290]: ast_ouraddrfor doesn't do htons() on the port
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Dec 2 11:07:51 CST 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16290
======================================================================
Reported By: wdoekes
Assigned To: dvossel
======================================================================
Project: Asterisk
Issue ID: 16290
Category: Core/General
Reproducibility: always
Severity: trivial
Priority: normal
Status: closed
Asterisk Version: SVN
JIRA: SWP-443
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!):
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2009-11-20 04:53 CST
Last Modified: 2009-12-02 11:07 CST
======================================================================
Summary: ast_ouraddrfor doesn't do htons() on the port
Description:
In main/acl.c, in function ast_ouraddrfor when setting sin.sin_port, no
host to network order translation is performed on the port number (5060).
As long as no firewall rules trip over this during connect(2) (haven't
tested whether this could actually be an issue) this is no problem at all,
as no packets are actually sent.
But, if you're doing an strace, it looks kind of odd. It had me puzzled
for a while.
Suggested fix:
- Either add htons() around the 5060.
- Or add a comment about 50195 after the 5060 so it can be found when
grepping the source.
Regards,
Walter Doekes
OSSO B.V.
======================================================================
----------------------------------------------------------------------
(0114532) svnbot (reporter) - 2009-12-02 11:07
https://issues.asterisk.org/view.php?id=16290#c114532
----------------------------------------------------------------------
Repository: asterisk
Revision: 232351
_U trunk/
U trunk/main/acl.c
------------------------------------------------------------------------
r232351 | dvossel | 2009-12-02 11:07:50 -0600 (Wed, 02 Dec 2009) | 12
lines
Merged revisions 232350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r232350 | dvossel | 2009-12-02 10:59:18 -0600 (Wed, 02 Dec 2009) | 6
lines
ast_outaddrfor doesn't do htons() on port, looks odd in strace.
(closes issue https://issues.asterisk.org/view.php?id=16290)
Reported by: wdoekes
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=232351
Issue History
Date Modified Username Field Change
======================================================================
2009-12-02 11:07 svnbot Checkin
2009-12-02 11:07 svnbot Note Added: 0114532
======================================================================
More information about the asterisk-bugs
mailing list