From 975ae9979ec73e8acb2c215ee9a84fded2f4357a Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 24 Apr 2009 20:45:21 +0200 Subject: 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 --- src/conntrack/build.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/conntrack/build.c') 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: -- cgit v1.2.3