2009-07-08 19:41:43 +02:00
|
|
|
Index: trunk/src/lib/krb5/os/hostaddr.c
|
2008-12-15 14:48:05 +01:00
|
|
|
===================================================================
|
2009-07-08 19:41:43 +02:00
|
|
|
--- trunk.orig/src/lib/krb5/os/hostaddr.c
|
|
|
|
+++ trunk/src/lib/krb5/os/hostaddr.c
|
2008-12-15 14:48:05 +01:00
|
|
|
@@ -43,7 +43,7 @@ krb5_os_hostaddr(krb5_context context, c
|
|
|
|
return KRB5_ERR_BAD_HOSTNAME;
|
|
|
|
|
|
|
|
memset (&hints, 0, sizeof (hints));
|
|
|
|
- hints.ai_flags = AI_NUMERICHOST;
|
|
|
|
+ hints.ai_flags = AI_NUMERICHOST | AI_ADDRCONFIG;
|
|
|
|
/* We don't care what kind at this point, really, but without
|
|
|
|
this, we can get back multiple sockaddrs per address, for
|
|
|
|
SOCK_DGRAM, SOCK_STREAM, and SOCK_RAW. I haven't checked if
|
2009-07-08 19:41:43 +02:00
|
|
|
Index: trunk/src/lib/krb5/os/hst_realm.c
|
2008-12-15 14:48:05 +01:00
|
|
|
===================================================================
|
2009-07-08 19:41:43 +02:00
|
|
|
--- trunk.orig/src/lib/krb5/os/hst_realm.c
|
|
|
|
+++ trunk/src/lib/krb5/os/hst_realm.c
|
|
|
|
@@ -171,7 +171,7 @@ krb5int_get_fq_hostname (char *buf, size
|
2008-12-15 14:48:05 +01:00
|
|
|
int err;
|
|
|
|
|
|
|
|
memset (&hints, 0, sizeof (hints));
|
|
|
|
- hints.ai_flags = AI_CANONNAME;
|
|
|
|
+ hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
|
|
|
|
err = getaddrinfo (name, 0, &hints, &ai);
|
|
|
|
if (err)
|
|
|
|
return krb5int_translate_gai_error (err);
|
2009-07-08 19:41:43 +02:00
|
|
|
Index: trunk/src/lib/krb5/os/locate_kdc.c
|
2008-12-15 14:48:05 +01:00
|
|
|
===================================================================
|
2009-07-08 19:41:43 +02:00
|
|
|
--- trunk.orig/src/lib/krb5/os/locate_kdc.c
|
|
|
|
+++ trunk/src/lib/krb5/os/locate_kdc.c
|
2008-12-15 14:48:05 +01:00
|
|
|
@@ -254,8 +254,9 @@ krb5int_add_host_to_list (struct addrlis
|
|
|
|
memset(&hint, 0, sizeof(hint));
|
|
|
|
hint.ai_family = family;
|
|
|
|
hint.ai_socktype = socktype;
|
|
|
|
+ hint.ai_flags = AI_ADDRCONFIG;
|
|
|
|
#ifdef AI_NUMERICSERV
|
|
|
|
- hint.ai_flags = AI_NUMERICSERV;
|
|
|
|
+ hint.ai_flags |= AI_NUMERICSERV;
|
|
|
|
#endif
|
2009-07-08 19:41:43 +02:00
|
|
|
if (snprintf(portbuf, sizeof(portbuf), "%d", ntohs(port)) >= sizeof(portbuf))
|
|
|
|
/* XXX */
|
|
|
|
Index: trunk/src/lib/krb5/os/sn2princ.c
|
2008-12-15 14:48:05 +01:00
|
|
|
===================================================================
|
2009-07-08 19:41:43 +02:00
|
|
|
--- trunk.orig/src/lib/krb5/os/sn2princ.c
|
|
|
|
+++ trunk/src/lib/krb5/os/sn2princ.c
|
|
|
|
@@ -107,7 +107,7 @@ krb5_sname_to_principal(krb5_context con
|
2008-12-15 14:48:05 +01:00
|
|
|
|
|
|
|
memset(&hints, 0, sizeof(hints));
|
|
|
|
hints.ai_family = AF_INET;
|
2009-07-08 19:41:43 +02:00
|
|
|
- hints.ai_flags = AI_CANONNAME;
|
|
|
|
+ hints.ai_flags = AI_CANONNAME|AI_ADDRCONFIG;
|
2008-12-15 14:48:05 +01:00
|
|
|
try_getaddrinfo_again:
|
|
|
|
err = getaddrinfo(hostname, 0, &hints, &ai);
|
|
|
|
if (err) {
|