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> | 2008-03-25 14:37:51 +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> | 2008-03-25 14:37:51 +0000 |
commit | 0e82c979fb08611ecb1aff659d9ac0ed056948ea (patch) | |
tree | 21f386a53ea98194aeb795c9794e4ffe6cfdbbcf /src | |
parent | 46e76aff2d0fc0d88ccdbc0cef43d9e3f3c4c388 (diff) | |
download | conntrack-tools-0e82c979fb08611ecb1aff659d9ac0ed056948ea.tar.gz conntrack-tools-0e82c979fb08611ecb1aff659d9ac0ed056948ea.zip |
Krzysztof Oledzki <ole@ans.pl>:
o add ICMPv6 (-p icmpv6) support
o add possibility to distinguish between invalid (unknown) and empty proto
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/conntrack.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 494da4f..d3fc020 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_LDADD = ../extensions/libct_proto_tcp.la ../extensions/libct_proto_udp.la ../extensions/libct_proto_icmp.la +conntrack_LDADD = ../extensions/libct_proto_tcp.la ../extensions/libct_proto_udp.la ../extensions/libct_proto_icmp.la ../extensions/libct_proto_icmpv6.la conntrack_LDFLAGS = $(all_libraries) @LIBNETFILTER_CONNTRACK_LIBS@ conntrackd_SOURCES = alarm.c main.c run.c hash.c queue.c rbtree.c \ diff --git a/src/conntrack.c b/src/conntrack.c index 82ff544..a6e7d6f 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -684,6 +684,7 @@ int main(int argc, char *argv[]) register_tcp(); register_udp(); register_icmp(); + register_icmpv6(); 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:n::" @@ -819,10 +820,13 @@ int main(int argc, char *argv[]) nfct_set_attr_u8(obj, ATTR_REPL_L3PROTO, l3protonum); break; case 'p': + if (!optarg || !*optarg) + exit_error(PARAMETER_PROBLEM, "proto needed\n"); + options |= CT_OPT_PROTO; h = findproto(optarg); if (!h) - exit_error(PARAMETER_PROBLEM, "proto needed\n"); + exit_error(PARAMETER_PROBLEM, "unknown proto\n"); nfct_set_attr_u8(obj, ATTR_ORIG_L4PROTO, h->protonum); nfct_set_attr_u8(obj, ATTR_REPL_L4PROTO, h->protonum); |