summaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-04-24 12:23:03 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-04-24 12:23:03 +0200
commitb808645ec71b7cc22cf5106b3d79625d07e6077c (patch)
tree61c454be50eea566855ad40cbe641ba3c0b3e64b /src/parse.c
parent7866b938a909439fa09ea7f16f8676cdac5ea532 (diff)
downloadconntrack-tools-b808645ec71b7cc22cf5106b3d79625d07e6077c.tar.gz
conntrack-tools-b808645ec71b7cc22cf5106b3d79625d07e6077c.zip
sync: add support for DCCP state replication
This patch adds initial support for DCCP state replication. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c
index d14910a..100177b 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -30,6 +30,7 @@ static void parse_u32(struct nf_conntrack *ct, int attr, void *data);
static void parse_group(struct nf_conntrack *ct, int attr, void *data);
static void parse_nat_seq_adj(struct nf_conntrack *ct, int attr, void *data);
static void parse_sctp(struct nf_conntrack *ct, int attr, void *data);
+static void parse_dccp(struct nf_conntrack *ct, int attr, void *data);
struct parser {
void (*parse)(struct nf_conntrack *ct, int attr, void *data);
@@ -126,6 +127,10 @@ static struct parser h[NTA_MAX] = {
.parse = parse_sctp,
.size = NTA_SIZE(sizeof(struct nta_attr_sctp)),
},
+ [NTA_STATE_DCCP] = {
+ .parse = parse_dccp,
+ .size = NTA_SIZE(sizeof(struct nta_attr_dccp)),
+ },
};
static void
@@ -182,6 +187,14 @@ parse_sctp(struct nf_conntrack *ct, int attr, void *data)
nfct_set_attr_u32(ct, ATTR_SCTP_VTAG_REPL, ntohl(this->vtag_repl));
}
+static void
+parse_dccp(struct nf_conntrack *ct, int attr, void *data)
+{
+ struct nta_attr_dccp *this = data;
+ nfct_set_attr_u8(ct, ATTR_DCCP_STATE, this->state);
+ nfct_set_attr_u8(ct, ATTR_DCCP_ROLE, this->role);
+}
+
int parse_payload(struct nf_conntrack *ct, struct nethdr *net, size_t remain)
{
int len;