Received: from eggs.gnu.org ([2001:4830:134:3::10]:56956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anl2e-0007no-R1 for qemu-devel@nongnu.org; Wed, 06 Apr 2016 06:50:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anl2Z-0003k6-Jf for qemu-devel@nongnu.org; Wed, 06 Apr 2016 06:50:32 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:53162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anl2Z-0003jr-7D for qemu-devel@nongnu.org; Wed, 06 Apr 2016 06:50:27 -0400 From: Alex Bligh Date: Wed, 6 Apr 2016 11:50:30 +0100 Message-Id: <1459939830-37998-1-git-send-email-alex@alex.org.uk> Subject: [Qemu-devel] [PATCH] doc/proto.md: NBD_OPT_STARTTLS cannot be used twice List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Wouter Verhelst Cc: "nbd-general@lists.sourceforge.net" , "qemu-devel@nongnu.org" , Alex Bligh Currently doc/proto.md is silent on use of NBD_OPT_STARTTLS when TLS has already been negotiated. Make it clear that this is not permitted. Signed-off-by: Alex Bligh --- doc/proto.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/proto.md b/doc/proto.md index 4d63b23..3648fa3 100644 --- a/doc/proto.md +++ b/doc/proto.md @@ -399,7 +399,10 @@ of the newstyle negotiation. `NBD_REP_ERR_POLICY`. For backwards compatibility, a client should also be prepared to handle `NBD_REP_ERR_UNSUP`. If the client sent along any data with the request, the server should send back - `NBD_REP_ERR_INVALID`. + `NBD_REP_ERR_INVALID`. The client MUST NOT send this option if + it has already negotiated TLS; if the server receives + `NBD_OPT_STARTTLS` when TLS has already been negotiated, the server + MUST send back `NBD_REP_ERR_INVALID`. This functionality has not yet been implemented by the reference implementation, but was implemented by qemu so has been moved out of -- 1.9.1