dns.idl ==> build breaks on non-ipv6 systems

David Holder david.holder at erion.co.uk
Sat Nov 6 03:50:57 MDT 2010


Hi Michael,

A few thoughts on the patch. May not be relevant as I don't know this 
bit of the code well...

1) I notice your constant for address length is set to 39. IPv6 
addresses can be 46 characters long.There is a standard constant for 
this INET6_ADDRSTRLEN.
2) The code assumes the format uses only colons. It ignores the legal 
formats which have dotted-decimal at the end. I don't know if such 
addresses will ever appear in this part of the code; has this been 
considered? For example, 0000:0000:0000:0000:0000:FFFF:192.168.100.200.
3) I was wondering if the code could be rewritten to use getaddrinfo() 
and getnameinfo(). Use of inet_pton and inet_ntop is not best practice 
as these are protocol dependent. getaddrinfo() and getnameinfo() can be 
used to do protocol independent text to address conversions and vice 
versa. With the appropriate flags they can do a lot for you, including 
address format checking.

Best Regards,
David
------------------------------------------------------------------------
Dr David Holder CEng FIET MIEEE

Erion Ltd, Oakleigh, Upper Sutherland Road, Halifax, HX3 8NT

Reception: +44 (0)1422 207000

Direct Dial: +44 (0)131 2026317

Cell: +44 (0) 7768 456831
Web: http://www.erion.co.uk

Registered in England and Wales. Registered Number 3521142
VAT Number: GB 698 3633 78



On 06/11/2010 02:05, Michael Adam wrote:
> Hi Kai and list,
>
> it seems the introduction of the dns server in s4
> has broken the build on non-ipv6 systems by using
> AD_INET6 unconditionally in the pull/push/print_ipv6
> functions in ndr_basic.c
>
> Since these functions are in ndr_basic.c this also
> breaks the build of s3 on non-ipv6-systems.
>
> Attached find a patch that moves these 3 functions
> to a new module ndr_ipv6.c that is only used in s4.
> So this fixes the build in s3. Andrew argued that
> this is no proper fixing, and he is right, but I
> think that these functions deserve their own module
> anyways. The s4 case needs fixing, but I would
> appreciate if you could push (or ACK) this patch first,
> Kai.
>
> Cheers - Michael
>


More information about the samba-technical mailing list