]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
more bits
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 15 Sep 2008 16:03:21 +0000 (04:03 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 15 Sep 2008 16:03:21 +0000 (04:03 +1200)
src/IPInterception.cc

index 4a8031f41fce0a973849418fcd633ce4ca13fb8c..677298767fc15ef3254861d540846235e28797d1 100644 (file)
@@ -158,10 +158,11 @@ int
 IPIntercept::NetfilterTransparent(int fd, const IPAddress &me, IPAddress &dst, int silent)
 {
 #if LINUX_NETFILTER
+    int tmp = 0;
 
     /** \par
      * Try lookup for TPROXY targets. BUT, only if the FD is flagged for transparent operations. */
-    if(getsockopt(fd, SOL_IP, IP_TRANSPARENT, NULL, 0) != 0) {
+    if(getsockopt(fd, SOL_IP, IP_TRANSPARENT, NULL, &tmp) != 0) {
         if(!silent) {
             debugs(89, DBG_IMPORTANT, HERE << " NF getsockopt(IP_TRANSPARENT) failed on FD " << fd << ": " << xstrerror());
             last_reported = squid_curtime;
@@ -171,6 +172,8 @@ IPIntercept::NetfilterTransparent(int fd, const IPAddress &me, IPAddress &dst, i
     else {
         // mark the socket for preservation of IP_TRANSPARENT
         fd_table[fd].flags.transparent = 1;
+        dst = me;
+        debugs(89, 9, HERE << "address: me= " << me << ", dst= " << dst);
         return 0;
     }