[sr-dev] tcp problem

Andrei Pelinescu-Onciul andrei at iptel.org
Fri Oct 30 14:13:18 CET 2009


On Oct 29, 2009 at 08:16, Klaus Darilion <klaus.mailinglists at pernau.at> wrote:
> Long time ago, ser always used the OS default interface for new TCP 
> connections. In Openser this was changed to the first listening TCP 
> address, and further could be specified by force_send_socket.
> 
> I know there were some changes in ser/sr too, but do not know exactly 
> what was changed.

In ser/sr the default ip for outgoing TCP connections can be forced
using:
tcp_source_ipv4="ip" and 
tcp_source_ipv6="ip".

By default the OS chooses the src ip (e.g. according to the routing
table) and ser/sr tries to match with the list of IPs it is listening
on. The default behaviour along with either listening on all the IPs or
making sure your routing table uses the src ip you want, it's more error
proof (automatic multi-homing) and a little bit faster (avoids an extra
bind()).

I could add a config option to always use the msg send_socket, but what
would probably be best would be to force a src_ip only if a send_socket
was forced and if not use the OS one or tcp_source_ipv4 if set.

Andrei



More information about the sr-dev mailing list