diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-06-09 19:24:07 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-06-09 19:24:07 +0000 |
commit | 7e28837a6073600129d2fc06c23c40726ef5976a (patch) | |
tree | 4062de4521e21fa4145a0919e23dde8647c888ad /src | |
parent | e0cdc12b83e62b4236f4b4bff3a4fd0475ed4822 (diff) | |
download | conntrack-tools-7e28837a6073600129d2fc06c23c40726ef5976a.tar.gz conntrack-tools-7e28837a6073600129d2fc06c23c40726ef5976a.zip |
remove dlopen infrastructure: simplification, it was too much for it
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/conntrack.c | 20 |
2 files changed, 5 insertions, 17 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index a67e09a..8647d04 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,7 @@ CLEANFILES = read_config_yy.c read_config_lex.c 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 \ diff --git a/src/conntrack.c b/src/conntrack.c index a14ee4b..eece45b 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -136,8 +136,6 @@ static char commands_v_options[NUMBER_OF_CMD][NUMBER_OF_OPT] = /*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 @@ static struct ctproto_handler *findproto(char *name) 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 @@ static struct ctproto_handler *findproto(char *name) } } - 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 @@ int main(int argc, char *argv[]) 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) { |