Re: [PATCH 1/2] tcp: setup random timestamp offset when write_seq already set

2017-02-20 Thread Alexey Kodanev
On 20.02.2017 18:18, David Miller wrote: > This would be so much easier to understand if it were coded as: > if (!tp->repair) { > seq = secure_tcp_sequence_number(...); > if (!tp->write_seq) > tp->write_seq = seq; > } Hi David, Thought

Re: [PATCH 1/2] tcp: setup random timestamp offset when write_seq already set

2017-02-20 Thread David Miller
From: Alexey Kodanev Date: Sat, 18 Feb 2017 03:56:11 +0300 > @@ -232,12 +232,17 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr > *uaddr, int addr_len) > sk->sk_gso_type = SKB_GSO_TCPV4; > sk_setup_caps(sk, &rt->dst); > > - if (!tp->write_seq && likely(!tp->repair)) > +

Re: [PATCH 1/2] tcp: setup random timestamp offset when write_seq already set

2017-02-18 Thread Alexey Kodanev
Hi, On 18.02.2017 3:56, Alexey Kodanev wrote: > Found that when random offset enabled (default) TCP client can > still start new connections with and without random offsets. Later, > if server does active close and re-use sockets in TIME-WAIT state, > new SYN from client can be rejected on PAWS che

[PATCH 1/2] tcp: setup random timestamp offset when write_seq already set

2017-02-17 Thread Alexey Kodanev
Found that when random offset enabled (default) TCP client can still start new connections with and without random offsets. Later, if server does active close and re-use sockets in TIME-WAIT state, new SYN from client can be rejected on PAWS check inside tcp_timewait_state_process(). Here is how t