AC_MSG_CHECKING(for GNU libc >= 2.1)
AC_DEFINE(HAVE_IPV6,1,Linux IPv6)
AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
+ dnl Linux has a compilation problem with mixing
+ dnl netinet/in.h and linux/in6.h they are not
+ dnl compatible. There has been discussion on
+ dnl how to fix it but no real progress on implementation
+ dnl when they fix it, remove this
+ AC_DEFINE(IPV6_MINHOPCOUNT, 73, Linux ipv6 Min Hop Count)
AC_EGREP_CPP(yes, [
#include <features.h>
#endif
}
-/* For some crazy reason, our build doesn't seem to pick this up */
-#ifdef GNU_LINUX
-#ifndef IP_MINTTL
-#define IP_MINTTL 21
-#endif
-#ifndef IPV6_MINHOPCNT
-#define IPV6_MINHOPCNT 73
-#endif
-#endif
-
int
sockopt_minttl (int family, int sock, int minttl)
{
return ret;
}
#endif /* IP_MINTTL */
-#ifdef IPV6_MINHOPCNT
+#ifdef IPV6_MINHOPCOUNT
if (family == AF_INET6)
{
- int ret = setsockopt (sock, IPPROTO_IPV6, IPV6_MINHOPCNT, &minttl, sizeof(minttl));
+ int ret = setsockopt (sock, IPPROTO_IPV6, IPV6_MINHOPCOUNT, &minttl, sizeof(minttl));
if (ret < 0)
zlog (NULL, LOG_WARNING,
- "can't set sockopt IPV6_MINHOPCNT to %d on socket %d: %s",
+ "can't set sockopt IPV6_MINHOPCOUNT to %d on socket %d: %s",
minttl, sock, safe_strerror (errno));
return ret;
}