summaryrefslogtreecommitdiff
path: root/extensions/libct_proto_icmpv6.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-03-06 19:38:53 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-03-06 19:38:53 +0100
commit52b80d312a3297f37e09e2802a52625dab0bbbfa (patch)
tree385f6136bd0b6aa44d8a708b8199edbc518142b4 /extensions/libct_proto_icmpv6.c
parentd70aed8f1d46a727c1b58df0b3bdf8d9ef219ffc (diff)
downloadconntrack-tools-52b80d312a3297f37e09e2802a52625dab0bbbfa.tar.gz
conntrack-tools-52b80d312a3297f37e09e2802a52625dab0bbbfa.zip
extensions: remove use of old libnetfilter API flags
This patch removes the use of the obsolete old libnetfilter protocol flags. This patch also improves error reporting in TCP and UDP. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libct_proto_icmpv6.c')
-rw-r--r--extensions/libct_proto_icmpv6.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/extensions/libct_proto_icmpv6.c b/extensions/libct_proto_icmpv6.c
index 388087d..cfc5979 100644
--- a/extensions/libct_proto_icmpv6.c
+++ b/extensions/libct_proto_icmpv6.c
@@ -20,7 +20,12 @@
#include <netinet/in.h> /* For htons */
#include <netinet/icmp6.h>
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
-#include <libnetfilter_conntrack/libnetfilter_conntrack_icmp.h>
+
+enum {
+ CT_ICMP_TYPE = (1 << 0),
+ CT_ICMP_CODE = (1 << 1),
+ CT_ICMP_ID = (1 << 2),
+};
static struct option opts[] = {
{ "icmpv6-type", 1, 0, '1' },
@@ -76,19 +81,19 @@ static int parse(char c,
tmp = atoi(optarg);
nfct_set_attr_u8(ct, ATTR_ICMP_TYPE, tmp);
nfct_set_attr_u8(ct, ATTR_L4PROTO, IPPROTO_ICMPV6);
- *flags |= ICMP_TYPE;
+ *flags |= CT_ICMP_TYPE;
break;
case '2':
tmp = atoi(optarg);
nfct_set_attr_u8(ct, ATTR_ICMP_CODE, tmp);
nfct_set_attr_u8(ct, ATTR_L4PROTO, IPPROTO_ICMPV6);
- *flags |= ICMP_CODE;
+ *flags |= CT_ICMP_CODE;
break;
case '3':
id = htons(atoi(optarg));
nfct_set_attr_u16(ct, ATTR_ICMP_ID, id);
nfct_set_attr_u8(ct, ATTR_L4PROTO, IPPROTO_ICMPV6);
- *flags |= ICMP_ID;
+ *flags |= CT_ICMP_ID;
break;
}
return 1;