]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Netfilter headers not detected properly.
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 19 Jun 2008 12:48:04 +0000 (00:48 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 19 Jun 2008 12:48:04 +0000 (00:48 +1200)
ip(6)tables v1.4.0 was released with a small bug in its header dependency.
This caused our configure checks for its usability to fail.

Also a mismatch between the code #if .. #endif and configure definitions
caused some pre-compiler logic failures on GCC 4.3.

This fixes both issues and makes Squid operable again when built against
Netfilter xtables v1.4.0

configure.in
src/IPInterception.cc

index 4d4a59ceafdcbc7145abbe70b5e6be6b352565b9..a550cb1069aa42ede14803dafc91854402b611fb 100755 (executable)
@@ -1196,6 +1196,8 @@ AC_ARG_ENABLE(ipfw-transparent,
        echo "IPFW Transparent Proxy enabled"
        AC_DEFINE(IPFW_TRANSPARENT,1,[Enable support for Transparent Proxy on systems using FreeBSD IPFW address redirection.])
        IPFW_TRANSPARENT="yes"
+  else
+       AC_DEFINE(IPFW_TRANSPARENT,0,[Enable support for Transparent Proxy on systems using FreeBSD IPFW address redirection.])
   fi
 ])
 
@@ -1208,6 +1210,8 @@ AC_ARG_ENABLE(ipf-transparent,
        echo "IP-Filter Transparent Proxy enabled"
        AC_DEFINE(IPF_TRANSPARENT,1,[Enable support for Transparent Proxy on systems using IP-Filter address redirection. This provides "masquerading" support for non Linux system.])
        IPF_TRANSPARENT="yes"
+  else
+       AC_DEFINE(IPF_TRANSPARENT,0,[Enable support for Transparent Proxy on systems using IP-Filter address redirection. This provides "masquerading" support for non Linux system.])
   fi
 ])
 
@@ -1220,6 +1224,8 @@ AC_ARG_ENABLE(pf-transparent,
        echo "PF Transparent Proxy enabled"
        AC_DEFINE(PF_TRANSPARENT,1,[Enable support for Transparent Proxy on systems using PF address redirection. This provides "masquerading" support for OpenBSD.])
        PF_TRANSPARENT="yes"
+  else
+       AC_DEFINE(PF_TRANSPARENT,0,[Enable support for Transparent Proxy on systems using PF address redirection. This provides "masquerading" support for OpenBSD.])
   fi
 ])
 
@@ -1231,6 +1237,8 @@ AC_ARG_ENABLE(linux-netfilter,
        echo "Linux (Netfilter) Transparent Proxy enabled"
        AC_DEFINE(LINUX_NETFILTER,1,[Enable support for Transparent Proxy on Linux (Netfilter) systems])
        LINUX_NETFILTER="yes"
+  else
+       AC_DEFINE(LINUX_NETFILTER,0,[Enable support for Transparent Proxy on Linux (Netfilter) systems])
   fi
 ])
 
@@ -1344,6 +1352,8 @@ AC_ARG_ENABLE(linux-tproxy,
            echo "Linux-Netfilter Transparent Proxy automatically enabled"
            LINUX_NETFILTER="yes"
        fi
+  else
+       AC_DEFINE(LINUX_TPROXY2, 0, [Enable real Transparent Proxy support for Netfilter TPROXY v2.])
   fi
 ])
 
@@ -2193,6 +2203,10 @@ SQUID_DEFAULT_INCLUDES
 #if HAVE_LIMITS_H
 #include <limits.h>
 #endif
+/* Netfilter ip(6)tables v1.4.0 has broken headers */
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
 )
 
 dnl *BSD dont include the depenencies for all their net/ and netinet/ files
index 74a89e8fc37abfc62a1eb3bc966a22e25dd2258a..c2e612cb4b3cd9faa28d9d0e615a6174a1cfc2fa 100644 (file)
@@ -32,7 +32,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  *
  */
-
+#include "config.h"
 #include "IPInterception.h"
 #include "fde.h"