Hi Eric, On Fri, Sep 03, 2021 at 07:39:38AM -0500, Eric Blake wrote: > Ping. > > On Mon, Aug 16, 2021 at 01:40:59PM -0500, Eric Blake wrote: > > 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. > > I originally wrote this patch prior to the point where we decided that > OPT_STARTTLS should also wipe the effects of OPT_STRUCTURED_REPLY; > given that change in the meantime, I'm tweaking that last sentence: > > Although such a client must negotiate structured replies after > starttls if it is going to actually connect to an export, this change > permits the client to shorten the handshake by two commands if it is > only being used to list available exports and their meta contexts. > > > --- > > 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`.
Yeah, makes sense. Setting a metadata context only makes sense once structured replies have been negotiated, but we state that clearly enough. Querying however doesn't set state, so that's fine. -- w@uter.{be,co.za} wouter@{grep.be,fosdem.org,debian.org} _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs