diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-11-19 18:11:10 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-11-19 18:11:10 +0000 |
commit | 393aac1629c8f82b7c448c8615745e89984899a8 (patch) | |
tree | e56ac6e9ea5caa42b1ee12cfb296de95b17e3d53 /io/channel-tls.c | |
parent | d304cf014bf9feec3dcd7ee65c75a7f52206ecdf (diff) | |
parent | 8cedcffdc195bc39aeb1373826ba0a45629741e0 (diff) | |
download | qemu-393aac1629c8f82b7c448c8615745e89984899a8.zip |
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2018-11-19' into staging
nbd patches for 2018-11-19
Add iotest coverage for NBD connections using TLS, including
a couple of code fixes that it pointed out
- Mao Zhongyi: 0/3 Do some cleaning work in qemu-iotests
- Daniel P. Berrangé: io: return 0 for EOF in TLS session read after shutdown
- Daniel P. Berrangé: 0/6 Misc fixes to NBD
- Eric Blake: iotests: Drop use of bash keyword 'function'
# gpg: Signature made Mon 19 Nov 2018 17:43:32 GMT
# gpg: using RSA key A7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>"
# gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>"
# gpg: aka "[jpeg image of size 6874]"
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A
* remotes/ericb/tags/pull-nbd-2018-11-19:
iotests: Drop use of bash keyword 'function'
iotests: Also test I/O over NBD TLS
tests: exercise NBD server in TLS mode
tests: add iotests helpers for dealing with TLS certificates
tests: check if qemu-nbd is still alive before waiting
tests: pull qemu-nbd iotest helpers into common.nbd file
io: return 0 for EOF in TLS session read after shutdown
nbd/server: Ignore write errors when replying to NBD_OPT_ABORT
nbd: fix whitespace in server error message
qemu-iotests: Modern shell scripting (use $() instead of ``)
qemu-iotests: convert `pwd` and $(pwd) to $PWD
qemu-iotests: remove unused variable 'here'
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'io/channel-tls.c')
-rw-r--r-- | io/channel-tls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/io/channel-tls.c b/io/channel-tls.c index 9628e6fa47..c98ead21b0 100644 --- a/io/channel-tls.c +++ b/io/channel-tls.c @@ -275,6 +275,9 @@ static ssize_t qio_channel_tls_readv(QIOChannel *ioc, } else { return QIO_CHANNEL_ERR_BLOCK; } + } else if (errno == ECONNABORTED && + (tioc->shutdown & QIO_CHANNEL_SHUTDOWN_READ)) { + return 0; } error_setg_errno(errp, errno, @@ -357,6 +360,8 @@ static int qio_channel_tls_shutdown(QIOChannel *ioc, { QIOChannelTLS *tioc = QIO_CHANNEL_TLS(ioc); + tioc->shutdown |= how; + return qio_channel_shutdown(tioc->master, how, errp); } |