[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] NBD_OPT_GO



Eric,

(apologies for using the wrong email address for me, which may mean my text didn't
get to the list - correct one inserted)

>> NBD_OPT_EXPORT_NAME with name="" selects default export
>> 
>> NBD_OPT_SELECT with name="" selects default export and returns
>> the name of the default export
>> 
>> NBD_OPT_GO with name="" selects the previously selected
>> NBD_OPT_SELECT (if one was selected), else the default export.
> 
> A bit confusing, but I could live with it (especially since I'm not done
> with my qemu port yet).  Post a doc patch, and I'd be glad to review it.

OK will do.

>>> NBD_OPT_SELECT can gracefully
>>> handle the empty name as selecting the default export, but NBD_OPT_GO
>>> would be ambiguous as to whether you are using it without a name option,
>>> or if you are using the optional name option to explicitly select the
>>> default export.
>> 
>> It depends whether you did a SELECT first.
> 
> I'm a bit worried about the sequence of:
> 
> NBD_OPT_SELECT (name): succeeds
> NBD_OPT_STARTTLS
> NBD_OPT_GO (no name)
> 
> The first SELECT means that I want to visit 'name', and the server
> succeeds because it is willing to offer the export without TLS.  But
> then I go ahead and negotiate TLS anyways, which wipes out the current
> selection.

I'm a bit confused as to why "negotiating TLS clears the selected export".
This seems a needless complication, but I'm sure there is some security
reason I've missed.

However if it is the case, then NBD_OPT_GO (no name) would do the
same as NBD_OPT_GO (no name) without a selection, i.e. use the default
export.
> 
> The spec, as currently written, says the NBD_OPT_GO will fail (I have no
> current selection); but by your proposal, it says I now want to visit
> the default export (which may be different than the export for name),
> and let me succeed.

Under the current proposal I believe it is implied that NBD_OPT_GO
needs to be preceded by a NBD_OPT_SELECT without an intervening
NBD_OPT_STARTTLS (as NBD_OPT_STARTTLS clears the selection), so
this is invalid behaviour per the current spec.

>  Then again, you could argue that any client smart
> enough to do NBD_OPT_STARTTLS and NBD_OPT_GO should know to renegotiate
> or to use NBD_OPT_GO(name from earlier select), so it's only a weak
> objection, where adequate documentation may be sufficient.

I'm more arguing that the current spec is experimental, and the
point about experimental bits of the specs is we can make changes,
particularly ones that only affect edge case.

-- 
Alex Bligh









Reply to: