mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
Fix max stream packet size for old clients
The libvirtd server pushes data out to clients. It does not
know what protocol version the client might have, so must be
conservative and use the old payload limits. ie send no more
than 256kb of data per packet.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 27e81517a8
)
This commit is contained in:
parent
03288d0de6
commit
167a756881
@ -710,7 +710,7 @@ daemonStreamHandleRead(virNetServerClientPtr client,
|
||||
daemonClientStream *stream)
|
||||
{
|
||||
char *buffer;
|
||||
size_t bufferLen = VIR_NET_MESSAGE_PAYLOAD_MAX;
|
||||
size_t bufferLen = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
|
||||
int ret;
|
||||
|
||||
VIR_DEBUG("client=%p, stream=%p tx=%d closed=%d",
|
||||
|
@ -50,6 +50,13 @@
|
||||
*/
|
||||
const VIR_NET_MESSAGE_INITIAL = 65536;
|
||||
|
||||
/*
|
||||
* Until we enlarged the message buffers, this was the max
|
||||
* payload size. We need to remember this for compat with
|
||||
* old clients.
|
||||
*/
|
||||
const VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX = 262144;
|
||||
|
||||
/* Maximum total message size (serialised). */
|
||||
const VIR_NET_MESSAGE_MAX = 16777216;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user