diff options
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 13 |
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; |