From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gilad Ben-Yossef Subject: [PATCH v3 1/7] Only parse time stamp TCP option in time wait sock Date: Mon, 26 Oct 2009 10:06:27 +0200 Message-ID: <1256544393-12450-2-git-send-email-gilad@codefidence.com> References: <1256544393-12450-1-git-send-email-gilad@codefidence.com> Cc: ori@comsleep.com, Gilad Ben-Yossef , Yony Amit To: netdev@vger.kernel.org Return-path: Received: from xenbox.codefidence.com ([92.48.73.16]:47202 "EHLO xenbox.codefidence.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755213AbZJZIGq (ORCPT ); Mon, 26 Oct 2009 04:06:46 -0400 In-Reply-To: <1256544393-12450-1-git-send-email-gilad@codefidence.com> Sender: netdev-owner@vger.kernel.org List-ID: Since we only use tcp_parse_options here to check for the exietence of TCP timestamp option in the header, it is better to call with the "established" flag on. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Ori Finkelman Signed-off-by: Yony Amit --- net/ipv4/tcp_minisocks.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 624c3c9..c49a550 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -100,9 +100,8 @@ tcp_timewait_state_process(struct inet_timewait_sock *tw, struct sk_buff *skb, struct tcp_options_received tmp_opt; int paws_reject = 0; - tmp_opt.saw_tstamp = 0; if (th->doff > (sizeof(*th) >> 2) && tcptw->tw_ts_recent_stamp) { - tcp_parse_options(skb, &tmp_opt, 0); + tcp_parse_options(skb, &tmp_opt, 1); if (tmp_opt.saw_tstamp) { tmp_opt.ts_recent = tcptw->tw_ts_recent; -- 1.5.6.3