summaryrefslogtreecommitdiffstats
path: root/extensions/libct_proto_sctp.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libct_proto_sctp.c')
-rw-r--r--extensions/libct_proto_sctp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/extensions/libct_proto_sctp.c b/extensions/libct_proto_sctp.c
index 5b50fbc..d5ff298 100644
--- a/extensions/libct_proto_sctp.c
+++ b/extensions/libct_proto_sctp.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"
@@ -138,12 +139,12 @@ int final_check(unsigned int flags,
void parse_proto(struct nfattr *cda[], struct ctnl_tuple *tuple)
{
- if (cda[CTA_PROTO_SCTP_SRC-1])
+ if (cda[CTA_PROTO_SRC_PORT-1])
tuple->l4src.sctp.port =
- *(u_int16_t *)NFA_DATA(cda[CTA_PROTO_SCTP_SRC-1]);
- if (cda[CTA_PROTO_SCTP_DST-1])
+ *(u_int16_t *)NFA_DATA(cda[CTA_PROTO_SRC_PORT-1]);
+ if (cda[CTA_PROTO_DST_PORT-1])
tuple->l4dst.sctp.port =
- *(u_int16_t *)NFA_DATA(cda[CTA_PROTO_SCTP_DST-1]);
+ *(u_int16_t *)NFA_DATA(cda[CTA_PROTO_DST_PORT-1]);
}
void parse_protoinfo(struct nfattr *cda[], struct ctnl_conntrack *ct)