[MEDIUM] add non-local bind to connect() on Linux
authorWilly Tarreau <w@1wt.eu>
Sun, 13 Jan 2008 15:31:17 +0000 (16:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 13 Jan 2008 15:31:17 +0000 (16:31 +0100)
commit5b6995c31b16c0fe618e402424ccc3f0a90bd45e
treeb6ea12b4b604dd30a01952e6c45728782abd4a3d
parentb1e52e8c4403a9a4fcb7effffc9749afd8f497a8
[MEDIUM] add non-local bind to connect() on Linux

Using some Linux kernel patches which add the IP_TRANSPARENT
SOL_IP option , it is possible to bind to a non-local address
on without having resort to any sort of NAT, thus causing no
performance degradation.

This is by far faster and cleaner than the previous CTTPROXY
method. The code has been slightly changed in order to remain
compatible with CTTPROXY as a fallback for the new method when
it does not work.

It is not needed anymore to specify the outgoing source address
for connect, it can remain 0.0.0.0.
src/backend.c
src/cfgparse.c