Messages in this thread | | | Date | Tue, 25 Mar 2014 02:47:12 +0400 | From | Pavel Emelyanov <> | Subject | Re: [PATCH 1/3] tcp: allow to enable repair mode for sockets in any state |
| |
> @@ -2375,7 +2378,7 @@ void tcp_sock_destruct(struct sock *sk) > static inline bool tcp_can_repair_sock(const struct sock *sk) > { > return ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN) && > - ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_ESTABLISHED)); > + (sk->sk_state != TCP_LISTEN);
This set only covers states that may happen after ESTABLISHED, so I would still exclude others (e.g. syn-sent) from the white list.
> } > > static int tcp_repair_options_est(struct tcp_sock *tp, >
Thanks, Pavel
| |