aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2017-10-05 16:50:57 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2017-10-12 12:10:37 +0200
commit9cca7578b45ac5b10c4cdb3dd7e08bb28c766c6d (patch)
tree5754c3566252a588d511fce8a3afe84b9c34daa4 /exec.c
parent3b19f4506901ecce25ff36cf62353a2b4bfe4f2b (diff)
char: don't skip client cleanup if 'connected' flag is unset
The tcp_chr_free_connection & tcp_chr_disconnect methods both skip all of their cleanup work unless the 's->connected' flag is set. This flag is set when the incoming client connection is ready to use. Crucially this is *after* the TLS handshake has been completed. So if the TLS handshake fails and we try to cleanup the failed client, all the cleanup is skipped as 's->connected' is still false. The only important thing that should be skipped in this case is sending of the CHR_EVENT_CLOSED, because we never got as far as sending the corresponding CHR_EVENT_OPENED. Every other bit of cleanup can be robust against being called even when s->connected is false. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <20171005155057.7664-1-berrange@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
0 files changed, 0 insertions, 0 deletions