[PATCH] s3: IPv6 enabled DNS connections for ADS client was Re: IPv6 enabled DNS connections over udp and tcp for ADS client
David Holder
david.holder at erion.co.uk
Wed May 13 08:25:07 MDT 2015
------------------------------------------------------------------------
Dr David Holder CEng FIET MIEEE
Erion Ltd, An Cala, Inverkirkaig, Lochinver, Sutherland, IV27 4LR, UK
Reception: +44 (0)1422 207000
Direct Dial: +44 (0)131 2026317
http://www.erion.co.uk
Registered in England and Wales. Registered Number 3521142
Registered Office: Newtons, 49 Coniscliffe Road, Darlington, County
Durham, DL3 7EH, UK
VAT Number: GB 698 3633 78
On 13/05/2015 00:28, Jeremy Allison wrote:
> On Tue, May 12, 2015 at 04:27:24PM -0700, Jeremy Allison wrote:
>> On Tue, May 12, 2015 at 04:18:39PM -0700, Jeremy Allison wrote:
>>> 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.
>> Oh yeah, one more thing - you can't use fprintf(stderr,
>> in library code. God knows what file descriptor #3 is
>> attached to, if anything :-).
> I meant file descriptor #2 of course :-).
Hi Jeremy,
Sorry for all the problems with the previous patch. The attached patch
should address everything you spotted, plus it includes a couple of
extra improvements.
Please could you review?
Couple of questions:
1) Is DEBUG level 1 appropriate for the getaddrinfo() errors?
2) Should I have have included just debug.h rather than includes.h?
Many thanks,
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-IPv6-enabled-DNS-connections-for-ADS-client.patch
Type: text/x-patch
Size: 6300 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150513/a3879378/attachment.bin>
More information about the samba-technical
mailing list