diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2005-10-31 04:25:58 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2005-10-31 04:25:58 +0000 |
commit | 1f948dd83a806ddbfa6d232e4e5df75634004631 (patch) | |
tree | 718591ed029b72f60ba6143c8974bf0a78fc1342 | |
parent | e56951deca51348dd616f34e74d458f437ed7ab8 (diff) | |
download | conntrack-tools-1f948dd83a806ddbfa6d232e4e5df75634004631.tar.gz conntrack-tools-1f948dd83a806ddbfa6d232e4e5df75634004631.zip |
See ChangeLog
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | extensions/libct_proto_icmp.c | 2 | ||||
-rw-r--r-- | extensions/libct_proto_sctp.c | 2 | ||||
-rw-r--r-- | extensions/libct_proto_tcp.c | 2 | ||||
-rw-r--r-- | extensions/libct_proto_udp.c | 2 | ||||
-rw-r--r-- | include/conntrack.h | 2 | ||||
-rw-r--r-- | src/conntrack.c | 75 |
7 files changed, 57 insertions, 40 deletions
@@ -1,3 +1,15 @@ +2005-10-30 +<pablo@eurodev.net> + Special thanks to Deti Fiegl from the Leibniz Supercomputing Centre in + Munich, Germany for providing the "fast" hardware to reproduce + spurious bugs ;) + + o Replace misleading message "Not enough memory" by "Can't open handler" + o New option -i for expectation dumping: conntrack -L expect [-i] + o sed 's/VERSION/CONNTRACK_VERSION/g' + o Fix nfct_open flags, now uses NFCT_ALL_GROUPS when needed + o Bumped version to 0.94 + 2005-10-28 <pablo@eurodev.net> o New option -i for dumping: conntrack -L [-i] diff --git a/extensions/libct_proto_icmp.c b/extensions/libct_proto_icmp.c index 7b2b24a..d9c5cb3 100644 --- a/extensions/libct_proto_icmp.c +++ b/extensions/libct_proto_icmp.c @@ -105,7 +105,7 @@ static struct ctproto_handler icmp = { .final_check = final_check, .help = help, .opts = opts, - .version = VERSION, + .version = CONNTRACK_VERSION, }; void __attribute__ ((constructor)) init(void); diff --git a/extensions/libct_proto_sctp.c b/extensions/libct_proto_sctp.c index f2ced21..2b1a337 100644 --- a/extensions/libct_proto_sctp.c +++ b/extensions/libct_proto_sctp.c @@ -143,7 +143,7 @@ static struct ctproto_handler sctp = { .final_check = final_check, .help = help, .opts = opts, - .version = VERSION, + .version = CONNTRACK_VERSION, }; void __attribute__ ((constructor)) init(void); diff --git a/extensions/libct_proto_tcp.c b/extensions/libct_proto_tcp.c index 8969b48..4aa6587 100644 --- a/extensions/libct_proto_tcp.c +++ b/extensions/libct_proto_tcp.c @@ -166,7 +166,7 @@ static struct ctproto_handler tcp = { .final_check = final_check, .help = help, .opts = opts, - .version = VERSION, + .version = CONNTRACK_VERSION, }; void __attribute__ ((constructor)) init(void); diff --git a/extensions/libct_proto_udp.c b/extensions/libct_proto_udp.c index 19af6f1..b33ba7d 100644 --- a/extensions/libct_proto_udp.c +++ b/extensions/libct_proto_udp.c @@ -131,7 +131,7 @@ static struct ctproto_handler udp = { .final_check = final_check, .help = help, .opts = opts, - .version = VERSION, + .version = CONNTRACK_VERSION, }; void __attribute__ ((constructor)) init(void); diff --git a/include/conntrack.h b/include/conntrack.h index 4aabd09..256fa00 100644 --- a/include/conntrack.h +++ b/include/conntrack.h @@ -6,7 +6,7 @@ #include <libnetfilter_conntrack/libnetfilter_conntrack.h> #define PROGNAME "conntrack" -#define VERSION "0.93" +#define CONNTRACK_VERSION "0.94" /* FIXME: These should be independent from kernel space */ #define IPS_ASSURED (1 << 2) diff --git a/src/conntrack.c b/src/conntrack.c index 83bbf70..4f9a687 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -227,7 +227,7 @@ static char commands_v_options[NUMBER_OF_CMD][NUMBER_OF_OPT] = /*CT_EVENT*/ {'x','x','x','x','x','x','x','x',' ','x','x','x','x','x','x','x'}, /*VERSION*/ {'x','x','x','x','x','x','x','x','x','x','x','x','x','x','x','x'}, /*HELP*/ {'x','x','x','x',' ','x','x','x','x','x','x','x','x','x','x','x'}, -/*EXP_LIST*/ {'x','x','x','x','x','x','x','x','x','x','x','x','x','x','x','x'}, +/*EXP_LIST*/ {'x','x','x','x','x','x','x','x','x','x','x','x','x','x','x',' '}, /*EXP_CREATE*/{'+','+',' ',' ','+','+',' ','x','x','+','+','+','+','x','x','x'}, /*EXP_DELETE*/{'+','+',' ',' ','+','x','x','x','x','x','x','x','x','x','x','x'}, /*EXP_GET*/ {'+','+',' ',' ','+','x','x','x','x','x','x','x','x','x','x','x'}, @@ -241,9 +241,9 @@ static LIST_HEAD(proto_list); void register_proto(struct ctproto_handler *h) { - if (strcmp(h->version, VERSION) != 0) { + if (strcmp(h->version, CONNTRACK_VERSION) != 0) { fprintf(stderr, "plugin `%s': version %s (I'm %s)\n", - h->name, h->version, VERSION); + h->name, h->version, CONNTRACK_VERSION); exit(1); } list_add(&h->head, &proto_list); @@ -316,7 +316,7 @@ exit_error(enum exittype status, char *msg, ...) global_option_offset = 0; } va_start(args, msg); - fprintf(stderr,"%s v%s: ", PROGNAME, VERSION); + fprintf(stderr,"%s v%s: ", PROGNAME, CONNTRACK_VERSION); vfprintf(stderr, msg, args); va_end(args); fprintf(stderr, "\n"); @@ -666,7 +666,7 @@ static void event_sighandler(int s) } void usage(char *prog) { -fprintf(stdout, "Tool to manipulate conntrack and expectations. Version %s\n", VERSION); +fprintf(stdout, "Tool to manipulate conntrack and expectations. Version %s\n", CONNTRACK_VERSION); fprintf(stdout, "Usage: %s [commands] [options]\n", prog); fprintf(stdout, "\n"); fprintf(stdout, "Commands:\n"); @@ -896,9 +896,9 @@ int main(int argc, char *argv[]) switch(command) { case CT_LIST: - cth = nfct_open(CONNTRACK, NFCT_ANY_GROUP); + cth = nfct_open(CONNTRACK, 0); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); if (options & CT_OPT_ID) nfct_register_callback(cth, @@ -915,10 +915,15 @@ int main(int argc, char *argv[]) break; case EXP_LIST: - cth = nfct_open(EXPECT, NFCT_ANY_GROUP); + cth = nfct_open(EXPECT, 0); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); - nfct_register_callback(cth, nfct_default_expect_display); + exit_error(OTHER_PROBLEM, "Can't open handler"); + if (options & CT_OPT_ID) + nfct_register_callback(cth, + nfct_default_expect_display_id); + else + nfct_register_callback(cth, + nfct_default_expect_display); res = nfct_dump_expect_list(cth); nfct_close(cth); break; @@ -944,10 +949,10 @@ int main(int argc, char *argv[]) if (!ct) exit_error(OTHER_PROBLEM, "Not Enough memory"); - cth = nfct_open(CONNTRACK, NFCT_ANY_GROUP); + cth = nfct_open(CONNTRACK, 0); if (!cth) { nfct_conntrack_free(ct); - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); } res = nfct_create_conntrack(cth, ct); nfct_close(cth); @@ -964,10 +969,10 @@ int main(int argc, char *argv[]) if (!exp) exit_error(OTHER_PROBLEM, "Not enough memory"); - cth = nfct_open(EXPECT, NFCT_ANY_GROUP); + cth = nfct_open(EXPECT, 0); if (!cth) { nfct_expect_free(exp); - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); } res = nfct_create_expectation(cth, exp); nfct_expect_free(exp); @@ -990,10 +995,10 @@ int main(int argc, char *argv[]) if (!ct) exit_error(OTHER_PROBLEM, "Not enough memory"); - cth = nfct_open(CONNTRACK, NFCT_ANY_GROUP); + cth = nfct_open(CONNTRACK, 0); if (!cth) { nfct_conntrack_free(ct); - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); } res = nfct_update_conntrack(cth, ct); nfct_conntrack_free(ct); @@ -1001,9 +1006,9 @@ int main(int argc, char *argv[]) break; case CT_DELETE: - cth = nfct_open(CONNTRACK, NFCT_ANY_GROUP); + cth = nfct_open(CONNTRACK, 0); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); if (options & CT_OPT_ORIG) res = nfct_delete_conntrack(cth, &orig, NFCT_DIR_ORIGINAL, @@ -1016,9 +1021,9 @@ int main(int argc, char *argv[]) break; case EXP_DELETE: - cth = nfct_open(EXPECT, NFCT_ANY_GROUP); + cth = nfct_open(EXPECT, 0); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); if (options & CT_OPT_ORIG) res = nfct_delete_expectation(cth, &orig, id); else if (options & CT_OPT_REPL) @@ -1027,9 +1032,9 @@ int main(int argc, char *argv[]) break; case CT_GET: - cth = nfct_open(CONNTRACK, NFCT_ANY_GROUP); + cth = nfct_open(CONNTRACK, 0); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); nfct_register_callback(cth, nfct_default_conntrack_display); if (options & CT_OPT_ORIG) res = nfct_get_conntrack(cth, &orig, @@ -1041,9 +1046,9 @@ int main(int argc, char *argv[]) break; case EXP_GET: - cth = nfct_open(EXPECT, NFCT_ANY_GROUP); + cth = nfct_open(EXPECT, 0); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); nfct_register_callback(cth, nfct_default_expect_display); if (options & CT_OPT_ORIG) res = nfct_get_expectation(cth, &orig, id); @@ -1053,17 +1058,17 @@ int main(int argc, char *argv[]) break; case CT_FLUSH: - cth = nfct_open(CONNTRACK, NFCT_ANY_GROUP); + cth = nfct_open(CONNTRACK, 0); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); res = nfct_flush_conntrack_table(cth); nfct_close(cth); break; case EXP_FLUSH: - cth = nfct_open(EXPECT, NFCT_ANY_GROUP); + cth = nfct_open(EXPECT, 0); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); res = nfct_flush_expectation_table(cth); nfct_close(cth); break; @@ -1072,15 +1077,15 @@ int main(int argc, char *argv[]) if (options & CT_OPT_EVENT_MASK) { cth = nfct_open(CONNTRACK, event_mask); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); signal(SIGINT, event_sighandler); nfct_register_callback(cth, nfct_default_conntrack_display); res = nfct_event_conntrack(cth); } else { - cth = nfct_open(CONNTRACK, NFCT_ANY_GROUP); + cth = nfct_open(CONNTRACK, NFCT_ALL_GROUPS); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); signal(SIGINT, event_sighandler); nfct_register_callback(cth, nfct_default_conntrack_display); res = nfct_event_conntrack(cth); @@ -1092,14 +1097,14 @@ int main(int argc, char *argv[]) if (options & CT_OPT_EVENT_MASK) { cth = nfct_open(EXPECT, event_mask); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); signal(SIGINT, event_sighandler); nfct_register_callback(cth, nfct_default_expect_display); res = nfct_event_expectation(cth); } else { - cth = nfct_open(EXPECT, NFCT_ANY_GROUP); + cth = nfct_open(EXPECT, NFCT_ALL_GROUPS); if (!cth) - exit_error(OTHER_PROBLEM, "Not enough memory"); + exit_error(OTHER_PROBLEM, "Can't open handler"); signal(SIGINT, event_sighandler); nfct_register_callback(cth, nfct_default_expect_display); res = nfct_event_expectation(cth); @@ -1108,7 +1113,7 @@ int main(int argc, char *argv[]) break; case CT_VERSION: - fprintf(stdout, "%s v%s\n", PROGNAME, VERSION); + fprintf(stdout, "%s v%s\n", PROGNAME, CONNTRACK_VERSION); break; case CT_HELP: usage(argv[0]); |