From: Gilad Ben-Yossef Date: Wed, 28 Oct 2009 04:15:21 +0000 (+0000) Subject: Only parse time stamp TCP option in time wait sock X-Git-Tag: MMI-PSA29.97-13-9~25754^2~619 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f55017a93f1a74d50244b1254b9a2bd7ac9bbf7d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Only parse time stamp TCP option in time wait sock 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 4c03598ed924..015e7c67dc88 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -100,9 +100,9 @@ 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); + tmp_opt.tstamp_ok = 1; + tcp_parse_options(skb, &tmp_opt, 1); if (tmp_opt.saw_tstamp) { tmp_opt.ts_recent = tcptw->tw_ts_recent;