]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_TCPMSS: restore build with IPv6-less libcs
authorJan Engelhardt <jengelh@medozas.de>
Fri, 22 Jul 2011 10:25:43 +0000 (12:25 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Fri, 22 Jul 2011 10:25:43 +0000 (12:25 +0200)
Commit v1.4.10-149-gea2a02f added an netinet/ip6.h include, which is
not available on systems without IPv6 header files.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
configure.ac
extensions/GNUmakefile.in
extensions/libxt_TCPMSS.c

index 5cb1b1bb87dcbe45b620b8fa3467f564d734b2d8..6aa0b2a72ce608fb32d698bdb597adfc3a9611c2 100644 (file)
@@ -68,6 +68,7 @@ if test "$ac_cv_header_linux_ip_vs_h" != "yes"; then
 fi;
 
 AC_SUBST([blacklist_modules])
+AC_CHECK_SIZEOF([struct ip6_hdr], [], [#include <netinet/ip6.h>])
 
 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"])
 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = "yes"])
index fbaf2eca798dd36e7d0ee185012e14254d438292..2b48d8410a631b5a5d13f20896e5d05771d961c4 100644 (file)
@@ -21,7 +21,7 @@ regular_CPPFLAGS := @regular_CPPFLAGS@
 kinclude_CPPFLAGS := @kinclude_CPPFLAGS@
 
 AM_CFLAGS      := ${regular_CFLAGS}
-AM_CPPFLAGS     = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS}
+AM_CPPFLAGS     = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS}
 AM_DEPFLAGS     = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
 
 ifeq (${V},)
index 48ab0445c11426b2c940ce1b08e6ba6aa7cdffec..4b71e44a4c733d3165f89d1414f3f2435d9a7476 100644 (file)
@@ -2,10 +2,10 @@
  *
  * Copyright (c) 2000 Marc Boucher
 */
+#include "config.h"
 #include <stdio.h>
 #include <xtables.h>
 #include <netinet/ip.h>
-#include <netinet/ip6.h>
 #include <linux/netfilter/xt_TCPMSS.h>
 
 enum {
@@ -34,7 +34,7 @@ static void TCPMSS_help(void)
 
 static void TCPMSS_help6(void)
 {
-       __TCPMSS_help(sizeof(struct ip6_hdr));
+       __TCPMSS_help(SIZEOF_STRUCT_IP6_HDR);
 }
 
 static const struct xt_option_entry TCPMSS4_opts[] = {
@@ -47,7 +47,7 @@ static const struct xt_option_entry TCPMSS4_opts[] = {
 
 static const struct xt_option_entry TCPMSS6_opts[] = {
        {.name = "set-mss", .id = O_SET_MSS, .type = XTTYPE_UINT16,
-        .min = 0, .max = UINT16_MAX - sizeof(struct ip6_hdr),
+        .min = 0, .max = UINT16_MAX - SIZEOF_STRUCT_IP6_HDR,
         .flags = XTOPT_PUT, XTOPT_POINTER(struct xt_tcpmss_info, mss)},
        {.name = "clamp-mss-to-pmtu", .id = O_CLAMP_MSS, .type = XTTYPE_NONE},
        XTOPT_TABLEEND,