From: Changli Gao Date: Sun, 1 Apr 2012 17:25:06 +0000 (+0000) Subject: netfilter: nf_ct_tcp: don't scale the size of the window up twice X-Git-Tag: MMI-PSA29.97-13-9~16882^2~25^2~12 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ee0b693bdb8ec56689e0d1cc533b16466fda048;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git netfilter: nf_ct_tcp: don't scale the size of the window up twice For a picked up connection, the window win is scaled twice: one is by the initialization code, and the other is by the sender updating code. I use the temporary variable swin instead of modifying the variable win. Signed-off-by: Changli Gao Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index 361eade62a09..0d07a1dcf605 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c @@ -584,8 +584,8 @@ static bool tcp_in_window(const struct nf_conn *ct, * Let's try to use the data from the packet. */ sender->td_end = end; - win <<= sender->td_scale; - sender->td_maxwin = (win == 0 ? 1 : win); + swin = win << sender->td_scale; + sender->td_maxwin = (swin == 0 ? 1 : swin); sender->td_maxend = end + sender->td_maxwin; /* * We haven't seen traffic in the other direction yet