From f95910fe6bbf64bb9b5cea7546a1778ba96ce782 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 10 Feb 2016 18:41:11 +0000 Subject: nbd: implement TLS support in the protocol negotiation This extends the NBD protocol handling code so that it is capable of negotiating TLS support during the connection setup. This involves requesting the STARTTLS protocol option before any other NBD options. Signed-off-by: Daniel P. Berrange Message-Id: <1455129674-17255-14-git-send-email-berrange@redhat.com> Signed-off-by: Paolo Bonzini --- qemu-nbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qemu-nbd.c') diff --git a/qemu-nbd.c b/qemu-nbd.c index 9710a26176..8acd515913 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -251,6 +251,7 @@ static void *nbd_client_thread(void *arg) } ret = nbd_receive_negotiate(QIO_CHANNEL(sioc), NULL, &nbdflags, + NULL, NULL, NULL, &size, &local_error); if (ret < 0) { if (local_error) { @@ -340,7 +341,8 @@ static gboolean nbd_accept(QIOChannel *ioc, GIOCondition cond, gpointer opaque) nb_fds++; nbd_update_server_watch(); - nbd_client_new(newproto ? NULL : exp, cioc, nbd_client_closed); + nbd_client_new(newproto ? NULL : exp, cioc, + NULL, NULL, nbd_client_closed); object_unref(OBJECT(cioc)); return TRUE; -- cgit v1.2.1