IPv6 enabled DNS connections over udp and tcp for ADS client

Jeremy Allison jra at samba.org
Tue May 12 17:18:39 MDT 2015


On Tue, May 12, 2015 at 09:26:01PM +0100, David Holder wrote:
> Hi All,
> 
> Please could you review the attached patch?
> 
> This makes DNS client connections protocol independent. Previously
> they were IPv4 only. Without this patch some DNS client
> functionality fails on an IPv6-only ADS client (for example DNS
> updates).
> 
> Many thanks,
> David

NAK on the below:

> +	int s,res;
> +	char service[255];
> +
> +	sprintf(service, "%d", DNS_TCP_PORT);

Come on, no sprintf's allowed, even if you *know*
it's going to fit :-). The next person who changes
it will mess it up. In the words of the Mens Warehouse
adverts - "I guarentee it" :-).

Use snprintf please. Also, some of the other formatting
is a lovecraftean horror :-). Please make it look like
the rest of the code.


More information about the samba-technical mailing list