]> git.ipfire.org Git - thirdparty/krb5.git/commit
In sn2princ, getaddrinfo without AI_ADDRCONFIG
authorGreg Hudson <ghudson@mit.edu>
Thu, 3 May 2012 15:15:51 +0000 (15:15 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 16 May 2012 18:08:34 +0000 (14:08 -0400)
commit57738b357e8b03bcb7af2f147c97cb84d0ce96e2
treea773ed259a7b9c7e50ff2be23b3fcba5286eb4c8
parenta03304db92419f2cd273ed2f070a9ff7eb7d7485
In sn2princ, getaddrinfo without AI_ADDRCONFIG

When canonicalizing a principal, use AI_CANONNAME alone in the hint
flags for getaddrinfo, for two reasons.  First, it works around a gnu
libc bug where getaddrinfo does a PTR lookup for the canonical name
(we tried to work around this in r24977 bug the addition of
AI_ADDRCONFIG caused the same problem as the use of AF_INET).  Second,
an IPv4-only host should be able create a principal for an IPv6-only
host even if it can't contact the host.

This does result in extra AAAA queries in the common case (IPv4-only
host contacting IPv4-only service), which is unfortunate.  But we need
to leave that optimization up to the platform at this point.

(cherry picked from commit c3ab5fe0b01a68b14d5657740006488721b48b7b)

ticket: 7124
version_fixed: 1.10.2
status: resolved
src/lib/krb5/os/sn2princ.c