From: Rybakov Andrey Date: Fri, 2 Feb 2018 15:26:34 +0000 (+0300) Subject: Fixed "Cannot assign requested address" for to-origin TPROXY FTP data (#142) X-Git-Tag: SQUID_3_5_28~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=133004297a1a39dcbe6fa8f398cc8070627541de;p=thirdparty%2Fsquid.git 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 6f5e4f89f9..70d88d6839 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);