Revert "lib: wrong #define used for IPV6_MINHOPCOUNT"
This reverts commit 54b88cac24f335414caa875b390d2d78ff4bf9e0.
Unfortunately, this breaks the build on systems where linux/in6.h and
netinet/in.h can't both be included, such as Ubuntu 14.04 and Debian
Jessie.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/configure.ac b/configure.ac
index 27014c3..f68d86f 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1072,7 +1072,7 @@
dnl IPv6 header checks
dnl ------------------
AC_CHECK_HEADERS([netinet6/in6.h netinet/in6_var.h netinet/icmp6.h \
- netinet6/in6_var.h netinet6/nd6.h linux/in6.h], [], [],
+ netinet6/in6_var.h netinet6/nd6.h], [], [],
QUAGGA_INCLUDES)
m4_define([QUAGGA_INCLUDES],dnl
@@ -1092,9 +1092,6 @@
#if HAVE_NETINET6_ND6_H
# include <netinet6/nd6.h>
#endif
-#if HAVE_LINUX_IN6_H
-# include <linux/in6.h>
-#endif
])dnl
dnl disable doc check
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 8f3540d..c7315f2 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -29,10 +29,6 @@
#include "log.h"
#include "jhash.h"
-#if defined(HAVE_LINUX_IN6_H)
-#include <linux/in6.h>
-#endif
-
#ifndef HAVE_INET_ATON
int
inet_aton (const char *cp, struct in_addr *inaddr)
@@ -510,13 +506,13 @@
return ret;
}
#endif /* IP_MINTTL */
-#ifdef IPV6_MINHOPCOUNT
+#ifdef IPV6_MINHOPCNT
if (family == AF_INET6)
{
- int ret = setsockopt (sock, IPPROTO_IPV6, IPV6_MINHOPCOUNT, &minttl, sizeof(minttl));
+ int ret = setsockopt (sock, IPPROTO_IPV6, IPV6_MINHOPCNT, &minttl, sizeof(minttl));
if (ret < 0)
zlog (NULL, LOG_WARNING,
- "can't set sockopt IPV6_MINHOPCOUNT to %d on socket %d: %s",
+ "can't set sockopt IPV6_MINHOPCNT to %d on socket %d: %s",
minttl, sock, safe_strerror (errno));
return ret;
}