[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1333292683-31414-1-git-send-email-xiaosuo@gmail.com>
Date: Sun, 1 Apr 2012 23:04:43 +0800
From: Changli Gao <xiaosuo@...il.com>
To: Pablo Neira Ayuso <pablo@...filter.org>
Cc: Patrick McHardy <kaber@...sh.net>,
"David S. Miller" <davem@...emloft.net>,
netfilter-devel@...r.kernel.org, netdev@...r.kernel.org,
Changli Gao <xiaosuo@...il.com>
Subject: [PATCH] netfilter: don't do window scaling for a picked up connection
For a picked up connection, the window scaling option is also lost, because this
option is only valid in SYN or SYN/ACK segments. We should remove the useless
expression to save the CPU power.
Signed-off-by: Changli Gao <xiaosuo@...il.com>
---
net/netfilter/nf_conntrack_proto_tcp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 361eade..22f0500 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -584,7 +584,6 @@ 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);
sender->td_maxend = end + sender->td_maxwin;
/*
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists