From patchwork Wed Apr 6 10:50:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bligh X-Patchwork-Id: 8760811 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8BA91C0553 for ; Wed, 6 Apr 2016 10:50:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BAD90201E4 for ; Wed, 6 Apr 2016 10:50:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1975C201DD for ; Wed, 6 Apr 2016 10:50:44 +0000 (UTC) Received: from localhost ([::1]:42324 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anl2o-0007nt-Gy for patchwork-qemu-devel@patchwork.kernel.org; Wed, 06 Apr 2016 06:50:42 -0400 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 Received: by mail.avalus.com (Postfix) with ESMTPSA id 8AA55C5605D; Wed, 6 Apr 2016 11:50:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alex.org.uk; s=mail; t=1459939825; bh=nYjht8zLsB7h9sT+AGZKA6QWZlO6LZqIOuNtiVh+Qf8=; h=From:To:Cc:Subject:Date; b=LVHfY07rU9HwJDgtmgpbJ28xGV+RWjICOCORaUp5qalQsqr21hNZ4mQzb9Ldi9dzr edrVjrTD5I800ZVe7QZrrml6U58C/9pgT+J+mB0Q3JIYy7n5en3JWgxWq9sXkjzGsJ 5RPlal/Ro/iBShAVUDiwktsYu9lCy9kkW8v1Zg30= From: Alex Bligh To: Eric Blake , Wouter Verhelst Date: Wed, 6 Apr 2016 11:50:30 +0100 Message-Id: <1459939830-37998-1-git-send-email-alex@alex.org.uk> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:41c8:10:1dd::10 Cc: "nbd-general@lists.sourceforge.net" , "qemu-devel@nongnu.org" , Alex Bligh Subject: [Qemu-devel] [PATCH] doc/proto.md: NBD_OPT_STARTTLS cannot be used twice X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Eric Blake --- 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