Hi,
In a hand-made application getaddrinfo resolves properly any FQDN with two level deep domain, e.g. google.com. But it fails to resolve host www.google.com, or deeper domains like google.co.uk.
gai_strerror(rc) gives
for FQDNs with more than two-levels deep (both IPv4 and IPv6).
Taking a look at what's going on in the network I see that for the erroneous case this is what I get:
The query question goes for group_compat, which indicates some nsswitch stuff. Why is it querying that?
I'm running 10.0-RELEASE-p9 without any special modification. The same application runs in Linux but in FreeBSD (which apart from developing I usually use for debugging and catching subtle bugs that usually pass unnoticed) I get this error. In Linux I compile it with gcc and in FreeBSD with clang.
I have no clue where the problem is and any help would be very appreciated.
Thanks in advance and kind regards,
In a hand-made application getaddrinfo resolves properly any FQDN with two level deep domain, e.g. google.com. But it fails to resolve host www.google.com, or deeper domains like google.co.uk.
gai_strerror(rc) gives
Code:
getaddrinfo error: hostname nor servname provided, or not known
Taking a look at what's going on in the network I see that for the erroneous case this is what I get:
Code:
07:14:35.038219 IP A.B.C.D.13162> W.X.Y.Z.53:3863+ A? group_compat.(30)
07:14:35.038558 IP W.X.Y.Z.53> A.B.C.D.13162:3863NXDomain0/1/0(105)
The query question goes for group_compat, which indicates some nsswitch stuff. Why is it querying that?
I'm running 10.0-RELEASE-p9 without any special modification. The same application runs in Linux but in FreeBSD (which apart from developing I usually use for debugging and catching subtle bugs that usually pass unnoticed) I get this error. In Linux I compile it with gcc and in FreeBSD with clang.
I have no clue where the problem is and any help would be very appreciated.
Thanks in advance and kind regards,