On Thu, Apr 27, 2017 at 11:22 AM, Frederic Lecaille <[email protected]>
wrote:

> On 04/27/2017 10:47 AM, Frederic Lecaille wrote:
>
>> Hello HAProxy ML,
>>
>> Please find attached to this mail a patch proposal which allows
>> server FQDNs changes from stats socket.
>>
>> These FQDNs are also added to server-state file.
>>
>> Regards,
>>
>> Fred.
>>
>
> A new version of this patch which fixes a memleak (server hostname
> was strdup() both in srv_set_fqdn() and srv_alloc_dns_resolution()).
>
>

Hi Fred,

I did a quick read of the patch and I noticed the following points:

- in update_server_fqdn(), I don't think it's relevant to perform the name
resolution validation (the call to str2ip2)
  First, str2ip2 uses libc resolver, which may be different from the
runtime resolver of HAProxy and second, it's up to the admin/devops/script
which performs this change to ensure he is not messing up...

- in srv_alloc_dns_resolution(), if strdup (or any alloc function) fails,
then we should report an error to the function caller and display a message
on the CLI.

Baptiste

Reply via email to