diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-04-24 20:45:21 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-04-24 20:45:21 +0200 |
commit | 975ae9979ec73e8acb2c215ee9a84fded2f4357a (patch) | |
tree | 7ca7bb94949bcf0aaae75824568d8ffadf579812 /src/conntrack/build.c | |
parent | 9540c4530976df1b1767e8b83ef287e492b237f1 (diff) |
src: add DCCP role attribute
This patch adds DCCP role attribute support. This needs Linux
kernel >= 2.6.30.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/conntrack/build.c')
-rw-r--r-- | src/conntrack/build.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/conntrack/build.c b/src/conntrack/build.c index 1738402..4c6a27e 100644 --- a/src/conntrack/build.c +++ b/src/conntrack/build.c @@ -160,16 +160,20 @@ static void __build_protoinfo(struct nfnlhdr *req, size_t size, nfnl_nest_end(&req->nlh, nest); break; case IPPROTO_DCCP: - if (!(test_bit(ATTR_DCCP_STATE, ct->set))) + if (!(test_bit(ATTR_DCCP_STATE, ct->set) && + test_bit(ATTR_DCCP_ROLE, ct->set))) break; nest = nfnl_nest(&req->nlh, size, CTA_PROTOINFO); nest_proto = nfnl_nest(&req->nlh, size, CTA_PROTOINFO_DCCP); - if (test_bit(ATTR_DCCP_STATE, ct->set)) - nfnl_addattr_l(&req->nlh, size, - CTA_PROTOINFO_DCCP_STATE, - &ct->protoinfo.dccp.state, - sizeof(u_int8_t)); + nfnl_addattr_l(&req->nlh, size, + CTA_PROTOINFO_DCCP_STATE, + &ct->protoinfo.dccp.state, + sizeof(u_int8_t)); + nfnl_addattr_l(&req->nlh, size, + CTA_PROTOINFO_DCCP_ROLE, + &ct->protoinfo.dccp.role, + sizeof(u_int8_t)); nfnl_nest_end(&req->nlh, nest_proto); nfnl_nest_end(&req->nlh, nest); default: |