From fb61c68dd0ba2e6ce98516ddbbd3b10638f4bcea Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 29 Dec 2009 18:47:10 +0100 Subject: src: add support for TCP window scale factor This patch adds the missing bits to support the modification of the TCP window scale factor in a conntrack entry. The kernel support has been already there since 2.6.23. Signed-off-by: Pablo Neira Ayuso --- src/conntrack/build.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/conntrack/build.c') diff --git a/src/conntrack/build.c b/src/conntrack/build.c index 91eca7d..e8bb9ac 100644 --- a/src/conntrack/build.c +++ b/src/conntrack/build.c @@ -125,6 +125,16 @@ static void __build_protoinfo(struct nfnlhdr *req, size_t size, CTA_PROTOINFO_TCP_FLAGS_REPLY, &ct->protoinfo.tcp.flags[1], sizeof(u_int16_t)); + if (test_bit(ATTR_TCP_WSCALE_ORIG, ct->set)) + nfnl_addattr_l(&req->nlh, size, + CTA_PROTOINFO_TCP_WSCALE_ORIGINAL, + &ct->protoinfo.tcp.wscale[__DIR_ORIG], + sizeof(u_int8_t)); + if (test_bit(ATTR_TCP_WSCALE_REPL, ct->set)) + nfnl_addattr_l(&req->nlh, size, + CTA_PROTOINFO_TCP_WSCALE_REPLY, + &ct->protoinfo.tcp.wscale[__DIR_REPL], + sizeof(u_int8_t)); nfnl_nest_end(&req->nlh, nest_proto); nfnl_nest_end(&req->nlh, nest); break; -- cgit v1.2.3