]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Netfilter headers not detected properly.
authorAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 20 Jun 2008 12:41:29 +0000 (06:41 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Fri, 20 Jun 2008 12:41:29 +0000 (06:41 -0600)
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
configure.in
include/autoconf.h.in

index 9da9143849503d942435d9ec4e03316dff7d9ebb..38e3a5cc3afc3f781d0a5a5a4e7093239a5db2aa 100755 (executable)
--- a/configure
+++ b/configure
@@ -22021,6 +22021,12 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
        IPFW_TRANSPARENT="yes"
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define IPFW_TRANSPARENT 0
+_ACEOF
+
   fi
 
 fi
@@ -22036,6 +22042,12 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
        IPF_TRANSPARENT="yes"
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define IPF_TRANSPARENT 0
+_ACEOF
+
   fi
 
 fi
@@ -22051,6 +22063,12 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
        PF_TRANSPARENT="yes"
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define PF_TRANSPARENT 0
+_ACEOF
+
   fi
 
 fi
@@ -22066,6 +22084,12 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
        LINUX_NETFILTER="yes"
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define LINUX_NETFILTER 0
+_ACEOF
+
   fi
 
 fi
@@ -22166,6 +22190,12 @@ _ACEOF
            echo "Linux-Netfilter Transparent Proxy automatically enabled"
            LINUX_NETFILTER="yes"
        fi
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define LINUX_TPROXY2 0
+_ACEOF
+
   fi
 
 fi
@@ -24511,6 +24541,10 @@ cat >>conftest.$ac_ext <<_ACEOF
 #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
 
 
 #include <$ac_header>
index b9675e0dd1f20a7cb4ca22141c405f686e1bab02..0ffdca7029679f6dce79fba0582609d668acaa2f 100755 (executable)
@@ -1091,6 +1091,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
 ])
 
@@ -1103,6 +1105,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
 ])
 
@@ -1115,6 +1119,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
 ])
 
@@ -1126,6 +1132,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
 ])
 
@@ -1239,6 +1247,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
 ])
 
@@ -1929,6 +1939,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 bccbcb9f8d580a629e25aa1b9a64880b0f903ae5..59827479797a54033de470446757e98fdf77af9e 100644 (file)
 /* Enable real Transparent Proxy support for Netfilter TPROXY. */
 #undef LINUX_TPROXY
 
+/* Enable real Transparent Proxy support for Netfilter TPROXY v2. */
+#undef LINUX_TPROXY2
+
 /* If we need to declare sys_errlist[] as external */
 #undef NEED_SYS_ERRLIST