Commit f55017a9 authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by David S. Miller

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: default avatarGilad Ben-Yossef <gilad@codefidence.com>
Signed-off-by: default avatarOri Finkelman <ori@comsleep.com>
Signed-off-by: default avatarYony Amit <yony@comsleep.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c871e664
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment