diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-01-07 13:57:53 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-01-07 15:00:51 -0800 |
| commit | 5e4641a147c3e450a56b199b9066f1af75c2f779 (patch) | |
| tree | bb7e2c04d331fcf42f37240d3f8cfe70200216ca /lib/stream-ssl.c | |
| parent | 42967038cbbb56b894e99eb17e5de7cfb11de9cf (diff) | |
| download | openvswitch-5e4641a147c3e450a56b199b9066f1af75c2f779.tar.gz | |
stream-ssl: Try to shut SSL connections down gracefully.
It's nice to shut down SSL connections gracefully when we can.
Diffstat (limited to 'lib/stream-ssl.c')
| -rw-r--r-- | lib/stream-ssl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 11bbf4ada..436dc7b26 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -437,6 +437,14 @@ ssl_close(struct stream *stream) { struct ssl_stream *sslv = ssl_stream_cast(stream); ssl_clear_txbuf(sslv); + + /* Attempt clean shutdown of the SSL connection. This will work most of + * the time, as long as the kernel send buffer has some free space and the + * SSL connection isn't renegotiating, etc. That has to be good enough, + * since we don't have any way to continue the close operation in the + * background. */ + SSL_shutdown(sslv->ssl); + SSL_free(sslv->ssl); close(sslv->fd); free(sslv); |
