From 8e23cf6e4bdd4276929a1e4d2a2a9fcf269cf7c7 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 29 Sep 2001 04:26:42 +0000 Subject: [PATCH] * locate_kdc.c (add_host_to_list): If address family in sockaddr structure is zero, copy it in from the addrinfo structure. Bug workaround for AIX 4.3.3. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13767 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 6 ++++++ src/lib/krb5/os/locate_kdc.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index cedf185ee..09d59fb04 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,9 @@ +2001-09-29 Ken Raeburn + + * locate_kdc.c (add_host_to_list): If address family in sockaddr + structure is zero, copy it in from the addrinfo structure. Bug + workaround for AIX 4.3.3. + 2001-09-28 Ken Raeburn * localaddr.c: Retrieve IPv6 addresses on Solaris 8. diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 52a564bd7..9908bae68 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -279,6 +279,10 @@ add_host_to_list (struct addrlist *lp, const char *hostname, if (err) return translate_ai_error (err); for (a = addrs; a; a = a->ai_next) { + /* AIX 4.3.3 is broken. */ + if (a->ai_addr->sa_family == 0) + a->ai_addr->sa_family = a->ai_family; + set_port_num (a->ai_addr, port); err = add_addrinfo_to_list (lp, a); if (err) -- 2.26.2