summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEric Blake2017-10-27 12:40:31 +0200
committerEric Blake2017-10-30 21:47:18 +0100
commite68c35cfb8088a11300371751e3987f67cac15b1 (patch)
treef39838ac71f66f4af60a30998fd04757a87d2f09 /scripts
parentnbd/server: Simplify nbd_negotiate_options loop (diff)
downloadqemu-e68c35cfb8088a11300371751e3987f67cac15b1.tar.gz
qemu-e68c35cfb8088a11300371751e3987f67cac15b1.tar.xz
qemu-e68c35cfb8088a11300371751e3987f67cac15b1.zip
nbd/server: Refactor zero-length option check
Consolidate the response for a non-zero-length option payload into a new function, nbd_reject_length(). This check will also be used when introducing support for structured replies. Note that STARTTLS response differs based on time: if the connection is still unencrypted, we set fatal to true (a client that can't request TLS correctly may still think that we are ready to start the TLS handshake, so we must disconnect); while if the connection is already encrypted, the client is sending a bogus request but is no longer at risk of being confused by continuing the connection. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20171027104037.8319-7-eblake@redhat.com> [eblake: correct return value on STARTTLS] Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions