On 1/26/26 15:22, Richard W.M. Jones wrote:
> v1: 
> https://lists.libvirt.org/archives/list/[email protected]/thread/YRCX4UCCLV4LTGDF4NCGZJWKUEFU6PGO/
> 
> In v2, replace multiple VIR_DEBUG with just one, and add the
> Reported-by and Reviewed-by tags on the last commit.
> 
> I'm sure this can't be the only place in libvirt that has to solve
> this problem (nor the "is this hostname IPv6" problem for that
> matter), but my searching skills are not good enough to find any other
> places.

Thing is, it can be not just address but a hostname too. I mean we do
have virSocketAddrFormat() but that works specifically with IP addresses
and/or UNIX sockets. And in this case, the hostname can be
"123.datacentre.internal.company.org" or whatever.

Having said that, esxUtil_ResolveHostname() returns resolved IP address
and it is passed to esxVI_Context_Connect() indeed, but HTTP has this
'Host' header field where the original hostname should appear, not
resolved IP address (though, I don't think anybody is running a web
server on their VMWare hosts).

Reviewed-by: Michal Privoznik <[email protected]>

Michal

Reply via email to