]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
http_port tproxy options MUST imply transparent.
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 31 Mar 2008 10:45:54 +0000 (22:45 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 31 Mar 2008 10:45:54 +0000 (22:45 +1200)
Also the TOS for IP_TRANSPARENT is apparently always '1'

src/cache_cf.cc
src/comm.cc

index d05034d035105ce22505991fd785795c29b0fafb..37e1c31fe05e64b27d76585bafc120d151000684 100644 (file)
@@ -2931,6 +2931,7 @@ parse_http_port_option(http_port_list * s, char *token)
 
     } else if (strcmp(token, "tproxy") == 0) {
         s->tproxy = 1;
+        s->transparent = 1;
         need_linux_tproxy = 1;
 #if USE_IPV6
         /* INET6: until transparent REDIRECT works on IPv6 SOCKET, force wildcard to IPv4 */
index cba736622607a5487a501aa91b2f34839728fd19..5d88c9abec75031c0469417468b4696223920850 100644 (file)
@@ -629,9 +629,10 @@ comm_set_v6only(int fd, int tos)
 }
 
 void
-comm_set_transparent(int fd, int tos)
+comm_set_transparent(int fd)
 {
 #if LINUX_TPROXY4
+    int tos = 1;
     if (setsockopt(fd, SOL_IP, IP_TRANSPARENT, (char *) &tos, sizeof(int)) < 0) {
         debugs(50, DBG_IMPORTANT, "comm_open: setsockopt(IP_TRANSPARENT) on FD " << fd << ": " << xstrerror());
     }