[asterisk-bugs] [Asterisk 0016290]: ast_ouraddrfor doesn't do htons() on the port
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Nov 20 04:53:21 CST 2009
The following issue has been SUBMITTED.
======================================================================
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: new
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 04:53 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 04:53 wdoekes New Issue
2009-11-20 04:53 wdoekes Asterisk Version => SVN
2009-11-20 04:53 wdoekes Regression => No
2009-11-20 04:53 wdoekes SVN Branch (only for SVN checkouts, not tarball
releases) => trunk
======================================================================
More information about the asterisk-bugs
mailing list