commit 133004297a1a39dcbe6fa8f398cc8070627541de (refs/remotes/origin/v3.5) Author: Rybakov Andrey Date: 2018-02-02 18:26:34 +0300 Fixed "Cannot assign requested address" for to-origin TPROXY FTP data (#142) diff --git a/src/clients/FtpClient.cc b/src/clients/FtpClient.cc index 6f5e4f8..70d88d6 100644 --- a/src/clients/FtpClient.cc +++ b/src/clients/FtpClient.cc @@ -761,6 +761,8 @@ Ftp::Client::connectDataChannel() conn->remote.port(data.port); conn->tos = ctrl.conn->tos; conn->nfmark = ctrl.conn->nfmark; + // Using non-local addresses in TPROXY mode requires appropriate socket option. + conn->flags |= ctrl.conn->flags & COMM_TRANSPARENT; debugs(9, 3, "connecting to " << conn->remote);