]> git.ipfire.org Git - thirdparty/qemu.git/commit
nbd/server: Plumb in new args to nbd_client_add()
authorEric Blake <eblake@redhat.com>
Wed, 7 Aug 2024 13:50:01 +0000 (08:50 -0500)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 28 Aug 2024 05:37:29 +0000 (08:37 +0300)
commit42f3a65e916cb135d99c4a239c1f2ef75f94d5f2
tree4ab685b06fa08a7d1d1c27a7475e3b240abff5f0
parent6622663a2cf1000c0bde9bf9300d2722e17a132e
nbd/server: Plumb in new args to nbd_client_add()

Upcoming patches to fix a CVE need to track an opaque pointer passed
in by the owner of a client object, as well as request for a time
limit on how fast negotiation must complete.  Prepare for that by
changing the signature of nbd_client_new() and adding an accessor to
get at the opaque pointer, although for now the two servers
(qemu-nbd.c and blockdev-nbd.c) do not change behavior even though
they pass in a new default timeout value.

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-ID: <20240807174943.771624-11-eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[eblake: s/LIMIT/MAX_SECS/ as suggested by Dan]
Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit fb1c2aaa981e0a2fa6362c9985f1296b74f055ac)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
blockdev-nbd.c
include/block/nbd.h
nbd/server.c
qemu-nbd.c