[Libguestfs] [PATCH v4 14/24] nbd/server: Prepare to receive extended header requests

Vladimir Sementsov-Ogievskiy vsementsov at yandex-team.ru
Fri Jun 16 18:35:44 UTC 2023


On 08.06.23 16:56, Eric Blake wrote:
> Although extended mode is not yet enabled, once we do turn it on, we
> need to accept extended requests for all messages.  Previous patches
> have already taken care of supporting 64-bit lengths, now we just need
> to read it off the wire.
> 
> Note that this implementation will block indefinitely on a buggy
> client that sends a non-extended payload (that is, we try to read a
> full packet before we ever check the magic number, but a client that
> mistakenly sends a simple request after negotiating extended headers
> doesn't send us enough bytes), but it's no different from any other
> client that stops talking to us partway through a packet and thus not
> worth coding around.
> 
> Signed-off-by: Eric Blake<eblake at redhat.com>


Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov at yandex-team.ru>

-- 
Best regards,
Vladimir



More information about the Libguestfs mailing list