Has been broken since
4eaf432.
1. acinclude/os-deps.m4 was missing sys/param.h header
2. acinclude/os-deps.m4 was incorrectly assuming that netinet/ip_nat.h
header is always present
3. acinclude/os-deps.m4 was missing netinet/ip_nat.h header where it was
used instead of ip_nat.h
4. src/ip/Intercept.cc assumed that AC_CHECK_MEMBERS(`struct X`)
outputs `HAVE_X`, but it actually outputs `HAVE_STRUCT_X`.
5. acinclude/os-deps.m4: AC_CHECK_MEMBERS(`X `) converted trailing
whitespace into surprising trailing underscores: `HAVE_X__`
## Solaris 10+ backported IPv6 NAT to their IPFilter v4.1 instead of using v5
AC_CHECK_MEMBERS([
struct natlookup.nl_inipaddr.in6,
- struct natlookup.nl_realipaddr.in6
- ],,,[
+ struct natlookup.nl_realipaddr.in6],,,[
#if USE_SOLARIS_IPFILTER_MINOR_T_HACK
#define minor_t fubar
#endif
+#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#elif HAVE_NETINET_IP_FIL_H
#include <netinet/ip_fil.h>
#endif
+#if HAVE_IP_NAT_H
#include <ip_nat.h>
+#elif HAVE_NETINET_IP_NAT_H
+#include <netinet/ip_nat.h>
+#endif
])
])
memset(&natLookup, 0, sizeof(natLookup));
// for NAT lookup set local and remote IP:port's
if (newConn->remote.isIPv6()) {
-#if HAVE_NATLOOKUP_NL_INIPADDR_IN6
+#if HAVE_STRUCT_NATLOOKUP_NL_INIPADDR_IN6
natLookup.nl_v = 6;
newConn->local.getInAddr(natLookup.nl_inipaddr.in6);
newConn->remote.getInAddr(natLookup.nl_outipaddr.in6);
debugs(89, 9, HERE << "address: " << newConn);
return false;
} else {
-#if HAVE_NATLOOKUP_NL_REALIPADDR_IN6
+#if HAVE_STRUCT_NATLOOKUP_NL_REALIPADDR_IN6
if (newConn->remote.isIPv6())
newConn->local = natLookup.nl_realipaddr.in6;
else