[libvirt] [PATCH 3/5] remote: implement remote protocol for virConnectListAllDomains()

Eric Blake eblake at redhat.com
Tue May 22 14:20:13 UTC 2012


On 05/22/2012 08:05 AM, Peter Krempa wrote:

>>> +
>>> +struct remote_connect_list_all_domains_ret {
>>> +    remote_nonnull_domain domains<>;
>>
>> This is an unbounded array; we aren't using any of these anywhere else.
>>   I wonder if reusing REMOTE_DOMAIN_ID_LIST_MAX would be reasonable
>> instead.  Then again, we are returning more information per domain: a
>> name, uuid, and id, so maybe REMOTE_DOMAIN_NAME_LIST_MAX is the best we
>> can do (currently 1024, but then again there is the pending patch to
>> raise that limit).  The name element may make us run into RPC limits
>> even if we don't otherwise enforce a limit.
>>
> 
> I chose the unbounded array intentionaly as I don't see any point in
> applying two limits on the size of the RPC message. I agree that the
> global message size limit is good for avoiding DoS attacks.

Interesting point - maybe it's worth re-evaluating which of our existing
limits should be made unbounded, under the umbrella of the overall RPC
limits being good enough.

> 
> I'll add the limit to conform with the rest of the code and hopefuly
> nobody will need more than 1024 machines soon.

Yeah, if we decide to go with unbounded structs within the scope of a
bounded maximum message, we should probably do it across the entire .x
file at once.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120522/ba20e1df/attachment-0001.sig>


More information about the libvir-list mailing list