diff options
author | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-01-12 14:45:24 -0800 |
---|---|---|
committer | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-01-12 14:45:24 -0800 |
commit | ca37a710d526d17490ebdc3af760bfddd316426d (patch) | |
tree | caeb883cf2302d30e010909bc543b09e191472cb /extensions | |
parent | c4414d9a8b31bedfb7471cd2365aaf5ea5cf55d5 (diff) | |
parent | 414fedd879fdc3cd0a910acd2fd9262251a6bfe7 (diff) | |
download | conntrack-tools-ca37a710d526d17490ebdc3af760bfddd316426d.tar.gz conntrack-tools-ca37a710d526d17490ebdc3af760bfddd316426d.zip |
Updating upstream with merged content from netfilter conntrack-tools version 1.0.1
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Makefile.in | 94 | ||||
-rw-r--r-- | extensions/libct_proto_tcp.c | 9 |
2 files changed, 63 insertions, 40 deletions
diff --git a/extensions/Makefile.in b/extensions/Makefile.in index ea3b62f..5f01bcf 100644 --- a/extensions/Makefile.in +++ b/extensions/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -34,7 +34,6 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -target_triplet = @target@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/Make_global.am subdir = extensions @@ -42,7 +41,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/configure.in + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -52,6 +51,9 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libct_proto_dccp_la_LIBADD = am_libct_proto_dccp_la_OBJECTS = libct_proto_dccp.lo libct_proto_dccp_la_OBJECTS = $(am_libct_proto_dccp_la_OBJECTS) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent libct_proto_gre_la_LIBADD = am_libct_proto_gre_la_OBJECTS = libct_proto_gre.lo libct_proto_gre_la_OBJECTS = $(am_libct_proto_gre_la_OBJECTS) @@ -77,18 +79,31 @@ libct_proto_unknown_la_LIBADD = am_libct_proto_unknown_la_OBJECTS = libct_proto_unknown.lo libct_proto_unknown_la_OBJECTS = $(am_libct_proto_unknown_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/depcomp +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libct_proto_dccp_la_SOURCES) $(libct_proto_gre_la_SOURCES) \ $(libct_proto_icmp_la_SOURCES) \ $(libct_proto_icmpv6_la_SOURCES) \ @@ -108,6 +123,7 @@ CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -130,7 +146,6 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ -HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -168,14 +183,14 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -XLEX = @XLEX@ -XYACC = @XYACC@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ @@ -226,18 +241,15 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ -target = @target@ target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = -std=gnu99 -W -Wall \ -Wmissing-prototypes -Wwrite-strings -Wcast-qual -Wfloat-equal -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wstrict-prototypes -Wundef \ - -Wno-unused-parameter + -Wno-unused-parameter ${LIBNFNETLINK_CFLAGS} \ + ${LIBNETFILTER_CONNTRACK_CFLAGS} noinst_LTLIBRARIES = libct_proto_tcp.la libct_proto_udp.la \ libct_proto_icmp.la libct_proto_icmpv6.la \ @@ -267,9 +279,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Make_global.am $(am_ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu extensions/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign extensions/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu extensions/Makefile + $(AUTOMAKE) --foreign extensions/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -298,23 +310,23 @@ clean-noinstLTLIBRARIES: rm -f "$${dir}/so_locations"; \ done libct_proto_dccp.la: $(libct_proto_dccp_la_OBJECTS) $(libct_proto_dccp_la_DEPENDENCIES) - $(LINK) $(libct_proto_dccp_la_OBJECTS) $(libct_proto_dccp_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libct_proto_dccp_la_OBJECTS) $(libct_proto_dccp_la_LIBADD) $(LIBS) libct_proto_gre.la: $(libct_proto_gre_la_OBJECTS) $(libct_proto_gre_la_DEPENDENCIES) - $(LINK) $(libct_proto_gre_la_OBJECTS) $(libct_proto_gre_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libct_proto_gre_la_OBJECTS) $(libct_proto_gre_la_LIBADD) $(LIBS) libct_proto_icmp.la: $(libct_proto_icmp_la_OBJECTS) $(libct_proto_icmp_la_DEPENDENCIES) - $(LINK) $(libct_proto_icmp_la_OBJECTS) $(libct_proto_icmp_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libct_proto_icmp_la_OBJECTS) $(libct_proto_icmp_la_LIBADD) $(LIBS) libct_proto_icmpv6.la: $(libct_proto_icmpv6_la_OBJECTS) $(libct_proto_icmpv6_la_DEPENDENCIES) - $(LINK) $(libct_proto_icmpv6_la_OBJECTS) $(libct_proto_icmpv6_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libct_proto_icmpv6_la_OBJECTS) $(libct_proto_icmpv6_la_LIBADD) $(LIBS) libct_proto_sctp.la: $(libct_proto_sctp_la_OBJECTS) $(libct_proto_sctp_la_DEPENDENCIES) - $(LINK) $(libct_proto_sctp_la_OBJECTS) $(libct_proto_sctp_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libct_proto_sctp_la_OBJECTS) $(libct_proto_sctp_la_LIBADD) $(LIBS) libct_proto_tcp.la: $(libct_proto_tcp_la_OBJECTS) $(libct_proto_tcp_la_DEPENDENCIES) - $(LINK) $(libct_proto_tcp_la_OBJECTS) $(libct_proto_tcp_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libct_proto_tcp_la_OBJECTS) $(libct_proto_tcp_la_LIBADD) $(LIBS) libct_proto_udp.la: $(libct_proto_udp_la_OBJECTS) $(libct_proto_udp_la_DEPENDENCIES) - $(LINK) $(libct_proto_udp_la_OBJECTS) $(libct_proto_udp_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libct_proto_udp_la_OBJECTS) $(libct_proto_udp_la_LIBADD) $(LIBS) libct_proto_udplite.la: $(libct_proto_udplite_la_OBJECTS) $(libct_proto_udplite_la_DEPENDENCIES) - $(LINK) $(libct_proto_udplite_la_OBJECTS) $(libct_proto_udplite_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libct_proto_udplite_la_OBJECTS) $(libct_proto_udplite_la_LIBADD) $(LIBS) libct_proto_unknown.la: $(libct_proto_unknown_la_OBJECTS) $(libct_proto_unknown_la_DEPENDENCIES) - $(LINK) $(libct_proto_unknown_la_OBJECTS) $(libct_proto_unknown_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libct_proto_unknown_la_OBJECTS) $(libct_proto_unknown_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -333,22 +345,28 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libct_proto_unknown.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< diff --git a/extensions/libct_proto_tcp.c b/extensions/libct_proto_tcp.c index cb573d0..0b43bf5 100644 --- a/extensions/libct_proto_tcp.c +++ b/extensions/libct_proto_tcp.c @@ -82,7 +82,8 @@ static const char *tcp_states[TCP_CONNTRACK_MAX] = { [TCP_CONNTRACK_LAST_ACK] = "LAST_ACK", [TCP_CONNTRACK_TIME_WAIT] = "TIME_WAIT", [TCP_CONNTRACK_CLOSE] = "CLOSE", - [TCP_CONNTRACK_LISTEN] = "LISTEN" + /* Since Linux kernel 2.6.31, LISTEN is SYN_SENT2. */ + [TCP_CONNTRACK_SYN_SENT2] = "SYN_SENT2" }; static void help(void) @@ -151,7 +152,11 @@ static int parse_options(char c, break; } } - if (i == TCP_CONNTRACK_MAX) + /* For backward compatibility with Linux kernel < 2.6.31. */ + if (strcmp(optarg, "LISTEN") == 0) { + nfct_set_attr_u8(ct, ATTR_TCP_STATE, + TCP_CONNTRACK_LISTEN); + } else if (i == TCP_CONNTRACK_MAX) exit_error(PARAMETER_PROBLEM, "unknown TCP state `%s'", optarg); *flags |= CT_TCP_STATE; |