[asterisk-bugs] [Asterisk 0016290]: ast_ouraddrfor doesn't do htons() on the port
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Nov 20 08:39:58 CST 2009
The following issue has been UPDATED.
======================================================================
https://issues.asterisk.org/view.php?id=16290
======================================================================
Reported By: wdoekes
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 16290
Category: Core/General
Reproducibility: always
Severity: trivial
Priority: normal
Status: acknowledged
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-11-20 04:53 CST
Last Modified: 2009-11-20 08:39 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.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2009-11-20 08:39 lmadsen OS all =>
2009-11-20 08:39 lmadsen os_build all =>
2009-11-20 08:39 lmadsen Platform little-endian =>
2009-11-20 08:39 lmadsen version 1.6.1.10 =>
2009-11-20 08:39 lmadsen Build svn =>
2009-11-20 08:39 lmadsen Description Updated
======================================================================
More information about the asterisk-bugs
mailing list