From 8cc931c15b42a71ce0d28384ae03bfa8a0a06d32 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 12 Jun 2010 21:20:24 +0200 Subject: 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 --- src/netlink.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/netlink.c') 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) >= -- cgit v1.2.3