[CRIU] [PATCH 1/3] tcp: allow to enable repair mode for sockets in any state
Pavel Emelyanov
xemul at parallels.com
Mon Mar 24 15:47:12 PDT 2014
> @@ -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
More information about the CRIU
mailing list