[OpenSIPS-Devel] [ opensips-Bugs-2827960 ] loose routed messages may use wrong outbound port

SourceForge.net noreply at sourceforge.net
Mon Jul 27 19:46:54 CEST 2009


Bugs item #2827960, was opened at 2009-07-27 10:46
Message generated for change (Tracker Item Submitted) made by peter_baer
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2827960&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Peter Baer (peter_baer)
Assigned to: Nobody/Anonymous (nobody)
Summary: loose routed messages may use wrong outbound port

Initial Comment:
loose_route() does not select the correct socket for relayed packets if the route header does not have a port specified and the proxy is setup to use more than one listening port (using same protocol).

So for example:
listen=192.168.1.100:15061
listen=192.168.1.100:5060

A request comes in on socket 192.168.1.100:15061 with route header:
Route: <sip:192.168.1.100:15061;r2=on;lr;ftag=71737667aac2b773o1>, <sip:192.168.1.100;r2=on;lr;ftag=71737667aac2b773o1>.

When loose_route gets called grep_sock_info() does not match on port because we look at 2nd route that has no port specified:
<sip:192.168.1.100;r2=on;lr;ftag=71737667aac2b773o1>

This causes the message is to be sent out on 192.168.1.100:15061 instead of 192.168.1.100:5060.

There is an attached patch that fixes this bug, but it has only been tested on 1.3.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2827960&group_id=232389



More information about the Devel mailing list