[Libguestfs] [PATCH] spec: Relax NBD_OPT_LIST_META_CONTEXTS

Eric Blake eblake at redhat.com
Mon Aug 16 18:40:59 UTC 2021


Using OPT_SET_META_CONTEXTS is stateful (it is documented to wipe out
any previously-requested contexts, and we just tightened the spec to
clarify that starting TLS also wipes it out).  But
OPT_LIST_META_CONTEXTS is not stateful; and in fact, with a
SELECTIVETLS server, it can be handy to list the meta contexts
available on an unencrypted export, then enable encryption, and then
further list what contexts are available on encrypted exports (as the
server is permitted to let them differ).  Thus, while a wise client
will renegotiate structured replies after the starttls, there's no
reason to forbid a server from answering a client that uses
list_meta_contexts prior to encryption without also requesting
structured replies.
---
 doc/proto.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/proto.md b/doc/proto.md
index 9dd59da..1586d7d 100644
--- a/doc/proto.md
+++ b/doc/proto.md
@@ -1325,9 +1325,9 @@ of the newstyle negotiation.
     Return a list of `NBD_REP_META_CONTEXT` replies, one per context,
     followed by an `NBD_REP_ACK` or an error.

-    This option MUST NOT be requested unless structured replies have
+    This option SHOULD NOT be requested unless structured replies have
     been negotiated first. If a client attempts to do so, a server
-    SHOULD send `NBD_REP_ERR_INVALID`.
+    MAY send `NBD_REP_ERR_INVALID`.

     Data:
     - 32 bits, length of export name.  
-- 
2.31.1




More information about the Libguestfs mailing list