From e44561766b025600e4af55a35166db46206dd42c Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 4 Oct 2008 11:32:37 +0200 Subject: conntrack: fix filtering for unsupported protocol This patch fixes filtering for unsupported protocol. Thus, you can use -L -p 47 or -L -p gre to filter `gre' traffic. Based on an initial patch from Bryan Duff . Signed-off-by: Pablo Neira Ayuso --- extensions/libct_proto_unknown.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 extensions/libct_proto_unknown.c (limited to 'extensions/libct_proto_unknown.c') diff --git a/extensions/libct_proto_unknown.c b/extensions/libct_proto_unknown.c new file mode 100644 index 0000000..2a47704 --- /dev/null +++ b/extensions/libct_proto_unknown.c @@ -0,0 +1,34 @@ +/* + * (C) 2005-2008 by Pablo Neira Ayuso + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ +#include +#include + +#include "conntrack.h" + +static struct option opts[] = { + {0, 0, 0, 0} +}; + +static void help(void) +{ + fprintf(stdout, " no options (unsupported)\n"); +} + +struct ctproto_handler ct_proto_unknown = { + .name = "unknown", + .help = help, + .opts = opts, + .version = VERSION, +}; + +void register_unknown(void) +{ + /* we don't actually insert this protocol in the list */ +} -- cgit v1.2.3