[Nbd] [PATCH v2 1/6] build: Silence autogen.sh warnings

2016-10-17 Thread Eric Blake
Starting from a fresh git checkout, running ./autogen.sh gives a couple of warnings on my Fedora 24 build tools, one from libtool: libtoolize: Consider adding '-I support' to ACLOCAL_AMFLAGS in Makefile.am. and one from automake: tests/run/Makefile.am:4: warning: source file

[Nbd] [PATCH v2 2/6] server: Fix botched strlen computation of error message

2016-10-17 Thread Eric Blake
Commit 3b80382 tried to make it easy for the server to send an error message whose length was determined by strlen(), but ended up sending a length of UINT32_MAX, causing clients to either hang up (reply too large) or wait for nearly 4G of data that was never coming. Signed-off-by: Eric Blake

[Nbd] [PATCH v2 3/6] server: Swap argument order in consume()

2016-10-17 Thread Eric Blake
The signature of consume() threw me off. Good design says that if you are going to have paired parameters (buf and bufsize), you generally want them adjacent, not separated by an unrelated parameter (len). Move len to be first, adjusting all callers. Signed-off-by: Eric Blake

[Nbd] [PATCH v2 6/6] server: Read client's TLS length data before next option

2016-10-17 Thread Eric Blake
Any client attempting to probe support for a new option, such as NBD_OPT_STARTTLS or NBD_OPT_GO, with plans to do a graceful fallback to older methods, will fail in its attempt if the server does not consume the length field and potential payload of the unrecognized (or rejected) option, because

[Nbd] [PATCH v2 4/6] server: Read client's unknown option length before next option

2016-10-17 Thread Eric Blake
Any client attempting to probe support for a new option, such as NBD_OPT_STARTTLS or NBD_OPT_GO, with plans to do a graceful fallback to older methods, will fail in its attempt if the server does not consume the length field and potential payload of the unrecognized (or rejected) option, because

Re: [Nbd] [PATCH] server: Read client's length data before next option

2016-10-17 Thread Wouter Verhelst
On Sun, Oct 16, 2016 at 02:19:54PM +0100, Alex Bligh wrote: > > > On 14 Oct 2016, at 22:11, Eric Blake wrote: > > > > Given that we have 4 years of buggy servers that will fail to react > > correctly to NBD_OPT_GO and friends, is it worth enhancing the docs to > > suggest

Re: [Nbd] [PATCH] build: Silence autogen.sh warnings

2016-10-17 Thread Eric Blake
On 10/14/2016 03:19 PM, Eric Blake wrote: > Starting from a fresh git checkout, running ./autogen.sh gives a > couple of warnings on my Fedora 24 build tools, one from libtool: > > libtoolize: Consider adding '-I support' to ACLOCAL_AMFLAGS in Makefile.am. > > and one from automake: > >

Re: [Nbd] build failure

2016-10-17 Thread Eric Blake
On 10/15/2016 01:46 PM, Wouter Verhelst wrote: > On Fri, Oct 14, 2016 at 03:11:55PM -0500, Eric Blake wrote: >> On 10/14/2016 01:32 PM, Wouter Verhelst wrote: >>> On Thu, Oct 13, 2016 at 05:33:18PM -0500, Eric Blake wrote: I'm getting this failure when trying to build NBD, as part of