summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-06-12 21:20:24 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-06-17 12:52:18 +0200
commit8cc931c15b42a71ce0d28384ae03bfa8a0a06d32 (patch)
tree80915edc8daf44932850b70205cc05702d263444
parent85f94171a71880c744f265268f33ad58819caa74 (diff)
downloadconntrack-tools-8cc931c15b42a71ce0d28384ae03bfa8a0a06d32.tar.gz
conntrack-tools-8cc931c15b42a71ce0d28384ae03bfa8a0a06d32.zip
conntrackd: complete TCP window scale support
In commit 56817d1c0cc30bcd65c56c2f73634b256603cc4d, I added the TCP window scale factor support but it was incomplete. We have to set the IP_CT_TCP_FLAG_WINDOW_SCALE flag to update the td_scale field via ctnetlink. Check nlattr_to_tcp(...) function in nf_conntrack_proto_tcp.c for more details. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/netlink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/netlink.c b/src/netlink.c
index 5b6452a..05a54bd 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -202,6 +202,8 @@ int nl_create_conntrack(struct nfct_handle *h,
if (!CONFIG(sync).tcp_window_tracking)
flags |= IP_CT_TCP_FLAG_BE_LIBERAL;
+ else
+ flags |= IP_CT_TCP_FLAG_WINDOW_SCALE;
/* FIXME: workaround, we should send TCP flags in updates */
if (nfct_get_attr_u8(ct, ATTR_TCP_STATE) >=
@@ -267,6 +269,8 @@ int nl_update_conntrack(struct nfct_handle *h,
if (!CONFIG(sync).tcp_window_tracking)
flags |= IP_CT_TCP_FLAG_BE_LIBERAL;
+ else
+ flags |= IP_CT_TCP_FLAG_WINDOW_SCALE;
/* FIXME: workaround, we should send TCP flags in updates */
if (nfct_get_attr_u8(ct, ATTR_TCP_STATE) >=