[netfilter-cvslog] r6870 - in trunk/conntrack-tools: . extensions
include src
pablo at netfilter.org
pablo at netfilter.org
Sat Jun 9 21:24:07 CEST 2007
Author: pablo at netfilter.org
Date: 2007-06-09 21:24:07 +0200 (Sat, 09 Jun 2007)
New Revision: 6870
Added:
trunk/conntrack-tools/extensions/Makefile.am
Removed:
trunk/conntrack-tools/extensions/Makefile.am
Modified:
trunk/conntrack-tools/ChangeLog
trunk/conntrack-tools/Makefile.am
trunk/conntrack-tools/configure.in
trunk/conntrack-tools/extensions/libct_proto_icmp.c
trunk/conntrack-tools/extensions/libct_proto_tcp.c
trunk/conntrack-tools/extensions/libct_proto_udp.c
trunk/conntrack-tools/include/conntrack.h
trunk/conntrack-tools/src/Makefile.am
trunk/conntrack-tools/src/conntrack.c
Log:
remove dlopen infrastructure: simplification, it was too much for it
Modified: trunk/conntrack-tools/ChangeLog
===================================================================
--- trunk/conntrack-tools/ChangeLog 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/ChangeLog 2007-06-09 19:24:07 UTC (rev 6870)
@@ -22,6 +22,7 @@
o add aliases --sport and --dport to make it more iptables-like
o add support for `-L --src-nat' and `-L --dst-nat' to show natted connections
o update conntrack(8) manpage
+o remove dlopen infrastructure
version 0.9.3 (2006/05/22)
------------------------------
Modified: trunk/conntrack-tools/Makefile.am
===================================================================
--- trunk/conntrack-tools/Makefile.am 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/Makefile.am 2007-06-09 19:24:07 UTC (rev 6870)
@@ -7,7 +7,7 @@
man_MANS = conntrack.8
EXTRA_DIST = $(man_MANS) Make_global.am ChangeLog TODO examples
-SUBDIRS = src extensions
+SUBDIRS = extensions src
DIST_SUBDIRS = include src extensions
LINKOPTS = -lnfnetlink -lnetfilter_conntrack -lpthread
AM_CFLAGS = -g
Modified: trunk/conntrack-tools/configure.in
===================================================================
--- trunk/conntrack-tools/configure.in 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/configure.in 2007-06-09 19:24:07 UTC (rev 6870)
@@ -98,15 +98,6 @@
dnl AC_FUNC_VPRINTF
dnl AC_CHECK_FUNCS([memset])
-dnl--------------------------------
-
-if test ! -z "$libdir"; then
- MODULE_DIR="\\\"$libdir/conntrack-tools/\\\""
- CFLAGS="$CFLAGS -DCONNTRACK_LIB_DIR=$MODULE_DIR"
-fi
-
-dnl--------------------------------
-
dnl AC_CONFIG_FILES([Makefile
dnl debug/Makefile
dnl debug/src/Makefile
Deleted: trunk/conntrack-tools/extensions/Makefile.am
===================================================================
--- trunk/conntrack-tools/extensions/Makefile.am 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/extensions/Makefile.am 2007-06-09 19:24:07 UTC (rev 6870)
@@ -1,14 +0,0 @@
-include $(top_srcdir)/Make_global.am
-
-AM_CFLAGS=-fPIC -Wall
-LIBS=
-
-pkglib_LTLIBRARIES = ct_proto_tcp.la ct_proto_udp.la \
- ct_proto_icmp.la
-
-ct_proto_tcp_la_SOURCES = libct_proto_tcp.c
-ct_proto_tcp_la_LDFLAGS = -module -avoid-version
-ct_proto_udp_la_SOURCES = libct_proto_udp.c
-ct_proto_udp_la_LDFLAGS = -module -avoid-version
-ct_proto_icmp_la_SOURCES = libct_proto_icmp.c
-ct_proto_icmp_la_LDFLAGS = -module -avoid-version
Added: trunk/conntrack-tools/extensions/Makefile.am
===================================================================
--- trunk/conntrack-tools/extensions/Makefile.am (rev 0)
+++ trunk/conntrack-tools/extensions/Makefile.am 2007-06-09 19:24:07 UTC (rev 6870)
@@ -0,0 +1,8 @@
+include $(top_srcdir)/Make_global.am
+
+noinst_LTLIBRARIES = libct_proto_tcp.la libct_proto_udp.la \
+ libct_proto_icmp.la
+
+libct_proto_tcp_la_SOURCES = libct_proto_tcp.c
+libct_proto_udp_la_SOURCES = libct_proto_udp.c
+libct_proto_icmp_la_SOURCES = libct_proto_icmp.c
Modified: trunk/conntrack-tools/extensions/libct_proto_icmp.c
===================================================================
--- trunk/conntrack-tools/extensions/libct_proto_icmp.c 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/extensions/libct_proto_icmp.c 2007-06-09 19:24:07 UTC (rev 6870)
@@ -91,9 +91,7 @@
.version = VERSION,
};
-static void __attribute__ ((constructor)) init(void);
-
-static void init(void)
+void register_icmp(void)
{
register_proto(&icmp);
}
Modified: trunk/conntrack-tools/extensions/libct_proto_tcp.c
===================================================================
--- trunk/conntrack-tools/extensions/libct_proto_tcp.c 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/extensions/libct_proto_tcp.c 2007-06-09 19:24:07 UTC (rev 6870)
@@ -215,9 +215,7 @@
.version = VERSION,
};
-static void __attribute__ ((constructor)) init(void);
-
-static void init(void)
+void register_tcp(void)
{
register_proto(&tcp);
}
Modified: trunk/conntrack-tools/extensions/libct_proto_udp.c
===================================================================
--- trunk/conntrack-tools/extensions/libct_proto_udp.c 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/extensions/libct_proto_udp.c 2007-06-09 19:24:07 UTC (rev 6870)
@@ -176,9 +176,7 @@
.version = VERSION,
};
-static void __attribute__ ((constructor)) init(void);
-
-static void init(void)
+void register_udp(void)
{
register_proto(&udp);
}
Modified: trunk/conntrack-tools/include/conntrack.h
===================================================================
--- trunk/conntrack-tools/include/conntrack.h 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/include/conntrack.h 2007-06-09 19:24:07 UTC (rev 6870)
@@ -170,4 +170,8 @@
extern void register_proto(struct ctproto_handler *h);
+extern void register_tcp(void);
+extern void register_udp(void);
+extern void register_icmp(void);
+
#endif
Modified: trunk/conntrack-tools/src/Makefile.am
===================================================================
--- trunk/conntrack-tools/src/Makefile.am 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/src/Makefile.am 2007-06-09 19:24:07 UTC (rev 6870)
@@ -7,7 +7,7 @@
sbin_PROGRAMS = conntrack conntrackd
conntrack_SOURCES = conntrack.c
-conntrack_LDFLAGS = -rdynamic
+conntrack_LDADD = ../extensions/libct_proto_tcp.la ../extensions/libct_proto_udp.la ../extensions/libct_proto_icmp.la
conntrackd_SOURCES = alarm.c main.c run.c hash.c buffer.c \
local.c log.c mcast.c netlink.c proxy.c lock.c \
Modified: trunk/conntrack-tools/src/conntrack.c
===================================================================
--- trunk/conntrack-tools/src/conntrack.c 2007-06-09 18:41:28 UTC (rev 6869)
+++ trunk/conntrack-tools/src/conntrack.c 2007-06-09 19:24:07 UTC (rev 6870)
@@ -136,8 +136,6 @@
/*EXP_EVENT*/ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
};
-static char *lib_dir = CONNTRACK_LIB_DIR;
-
static LIST_HEAD(proto_list);
static unsigned int options;
@@ -163,10 +161,6 @@
if (!name)
return handler;
- lib_dir = getenv("CONNTRACK_LIB_DIR");
- if (!lib_dir)
- lib_dir = CONNTRACK_LIB_DIR;
-
list_for_each(i, &proto_list) {
cur = (struct ctproto_handler *) i;
if (strcmp(cur->name, name) == 0) {
@@ -175,16 +169,6 @@
}
}
- if (!handler) {
- char path[sizeof("ct_proto_.so")
- + strlen(name) + strlen(lib_dir)];
- sprintf(path, "%s/ct_proto_%s.so", lib_dir, name);
- if (dlopen(path, RTLD_NOW))
- handler = findproto(name);
- else
- fprintf(stderr, "%s\n", dlerror());
- }
-
return handler;
}
@@ -700,6 +684,10 @@
memset(__mask, 0, sizeof(__mask));
memset(__exp, 0, sizeof(__exp));
+ register_tcp();
+ register_udp();
+ register_icmp();
+
while ((c = getopt_long(argc, argv,
"L::I::U::D::G::E::F::hVs:d:r:q:p:t:u:e:a:z[:]:{:}:m:i::f:o:",
opts, NULL)) != -1) {
More information about the netfilter-cvslog
mailing list