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/conntrack.c | |
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/conntrack.c')
-rw-r--r-- | src/conntrack.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |