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_4_0_24~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9dd43bbc13bc924afdc576807000cd2aa8e6c51a;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 4bc04ea0a9..777210c946 100644 --- a/src/clients/FtpClient.cc +++ b/src/clients/FtpClient.cc @@ -763,6 +763,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);