From: Florian Forster Date: Wed, 27 May 2009 12:20:24 +0000 (+0200) Subject: src/net_socket.c: Bind outgoing TCP sockets to `BindToAddress'. X-Git-Tag: release-1.0.10~58 X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=41a05f59ba2c3eb5caab555f096ed1b9fbe69ee3;hp=41a05f59ba2c3eb5caab555f096ed1b9fbe69ee3 src/net_socket.c: Bind outgoing TCP sockets to `BindToAddress'. If a host has multiple addresses on an interface, the source address of the TCP connection(s) was picked by the operating system while the UDP packets used a bound socket, i. e. the source address was the address specified by the user. This caused problems because the receiving code requires the TCP connection and the UDP connection to originate from the same IP address. This patch adds support for the `BindToInterface' and `BindToAddress' options to the setup of outgoing TCP connections. Tested with Debian Etch on x86 and Debian Lenny on x86_64. Signed-off-by: Florian Forster ---