diff options
author | Changli Gao <xiaosuo@gmail.com> | 2012-04-01 13:25:06 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-04-09 10:29:30 -0400 |
commit | 6ee0b693bdb8ec56689e0d1cc533b16466fda048 (patch) | |
tree | 3c473f3d7a8fad1ebf583f2a32ecd748e8d689e8 | |
parent | 110c43304db6f06490961529536c362d9ac5732f (diff) |
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 <xiaosuo@gmail.com>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/nf_conntrack_proto_tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, | |||
584 | * Let's try to use the data from the packet. | 584 | * Let's try to use the data from the packet. |
585 | */ | 585 | */ |
586 | sender->td_end = end; | 586 | sender->td_end = end; |
587 | win <<= sender->td_scale; | 587 | swin = win << sender->td_scale; |
588 | sender->td_maxwin = (win == 0 ? 1 : win); | 588 | sender->td_maxwin = (swin == 0 ? 1 : swin); |
589 | sender->td_maxend = end + sender->td_maxwin; | 589 | sender->td_maxend = end + sender->td_maxwin; |
590 | /* | 590 | /* |
591 | * We haven't seen traffic in the other direction yet | 591 | * We haven't seen traffic in the other direction yet |