summaryrefslogtreecommitdiff
path: root/extensions/libct_proto_tcp.c
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-07-22 07:40:26 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-07-22 07:40:26 +0000
commit7ec2f918a384e62ca5b0a62e204d1fbe882718d7 (patch)
treeac05cbabe784e7e614a9b4b6c9bb8ab00b648b37 /extensions/libct_proto_tcp.c
parent9ab85762233756f1e828f7c4c6007d25ac26f494 (diff)
downloadconntrack-tools-7ec2f918a384e62ca5b0a62e204d1fbe882718d7.tar.gz
conntrack-tools-7ec2f918a384e62ca5b0a62e204d1fbe882718d7.zip
major re-sync with current names/definitions in libctnetlink and kernel
Diffstat (limited to 'extensions/libct_proto_tcp.c')
-rw-r--r--extensions/libct_proto_tcp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/extensions/libct_proto_tcp.c b/extensions/libct_proto_tcp.c
index 5fa3652..973c5ab 100644
--- a/extensions/libct_proto_tcp.c
+++ b/extensions/libct_proto_tcp.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <getopt.h>
#include <stdlib.h>
+#include <string.h>
#include <netinet/in.h> /* For htons */
#include <linux/netfilter_ipv4/ip_conntrack_netlink.h>
#include "libct_proto.h"
@@ -160,12 +161,12 @@ int final_check(unsigned int flags,
void parse_proto(struct nfattr *cda[], struct ctnl_tuple *tuple)
{
- if (cda[CTA_PROTO_TCP_SRC-1])
+ if (cda[CTA_PROTO_SRC_PORT-1])
tuple->l4src.tcp.port =
- *(u_int16_t *)NFA_DATA(cda[CTA_PROTO_TCP_SRC-1]);
- if (cda[CTA_PROTO_TCP_DST-1])
+ *(u_int16_t *)NFA_DATA(cda[CTA_PROTO_SRC_PORT-1]);
+ if (cda[CTA_PROTO_DST_PORT-1])
tuple->l4dst.tcp.port =
- *(u_int16_t *)NFA_DATA(cda[CTA_PROTO_TCP_DST-1]);
+ *(u_int16_t *)NFA_DATA(cda[CTA_PROTO_DST_PORT-1]);
}
void parse_protoinfo(struct nfattr *cda[], struct ctnl_conntrack *ct)