Skip to content

Commit

Permalink
Only parse time stamp TCP option in time wait sock
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ori Finkelman <[email protected]>
Signed-off-by: Yony Amit <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Gilad Ben-Yossef authored and davem330 committed Oct 29, 2009
1 parent c871e66 commit f55017a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/tcp_minisocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f55017a

Please sign in to comment.