summaryrefslogtreecommitdiffstats
path: root/src/conntrack/build.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-12-29 18:47:10 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2010-02-16 14:56:28 +0100
commitfb61c68dd0ba2e6ce98516ddbbd3b10638f4bcea (patch)
tree0ad4f9153439bd7cee3340dbe7c02fb2f3e3e0d4 /src/conntrack/build.c
parent0d64ef303faf501398f0a241c3ab02855d8898b6 (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'src/conntrack/build.c')
-rw-r--r--src/conntrack/build.c10
1 files changed, 10 insertions, 0 deletions
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;