[libvirt] [PATCH] vz: fix vnc host address

Mikhail Feoktistov mfeoktistov at virtuozzo.com
Mon Oct 10 09:00:57 UTC 2016



On 10.10.2016 11:49, Michal Privoznik wrote:
> On 08.10.2016 00:05, Mikhail Feoktistov wrote:
>> Empty string means 127.0.0.1 in terms of vzSDK
>> But in this case we should set 0.0.0.0
>> ---
>>   .gnulib         | 2 +-
>>   src/vz/vz_sdk.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/.gnulib b/.gnulib
>> index e89b4a7..a2a3943 160000
>> --- a/.gnulib
>> +++ b/.gnulib
>> @@ -1 +1 @@
>> -Subproject commit e89b4a7aefce9cb02963920712ba7cdd13641644
>> +Subproject commit a2a39436b65f329630df4a93ec4e30aeae403c54
>> diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
>> index f2a5c96..7011cbf 100644
>> --- a/src/vz/vz_sdk.c
>> +++ b/src/vz/vz_sdk.c
>> @@ -2967,7 +2967,7 @@ static int prlsdkApplyGraphicsParams(PRL_HANDLE sdkdom,
>>   
>>       glisten = virDomainGraphicsGetListen(gr, 0);
>>       pret = PrlVmCfg_SetVNCHostName(sdkdom, glisten && glisten->address ?
>> -                                           glisten->address : "");
>> +                                           glisten->address : "0.0.0.0");
>>       prlsdkCheckRetGoto(pret, cleanup);
>>   
>>       ret = 0;
>>
> Is this true? I mean, in qemu by default vnc/spice listens on the
> localhost and not "0.0.0.0". It's more safe that way. Only if you
> configure it to listen on "0.0.0.0" you'll get a widely available socket.
>
> I mean for the following XML:
>
>      <graphics type='spice' autoport='yes'>
>        <listen type='address'/>
>      </graphics>
>
> I'd expect the guest to listen to 127.0.0.1. Or is this approached
> differently in vz driver?
>
> Michal
Sorry, I see that I send this patch too early.
I need to research more about vz driver behavior.
Please ignore this patch, I'll send another.




More information about the libvir-list mailing list