From: Amos Jeffries Date: Thu, 19 Jun 2008 12:48:04 +0000 (+1200) Subject: Netfilter headers not detected properly. X-Git-Tag: SQUID_3_1_0_1~49^2~198 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a74968c2ee912a9c5bf0fbcb5ae52453aee34915;p=thirdparty%2Fsquid.git Netfilter headers not detected properly. 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 --- diff --git a/configure.in b/configure.in index 4d4a59ceaf..a550cb1069 100755 --- a/configure.in +++ b/configure.in @@ -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 #endif +/* Netfilter ip(6)tables v1.4.0 has broken headers */ +#if HAVE_NETINET_IN_H +#include +#endif ) dnl *BSD dont include the depenencies for all their net/ and netinet/ files diff --git a/src/IPInterception.cc b/src/IPInterception.cc index 74a89e8fc3..c2e612cb4b 100644 --- a/src/IPInterception.cc +++ b/src/IPInterception.cc @@ -32,7 +32,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * */ - +#include "config.h" #include "IPInterception.h" #include "fde.h"