From ed9337fb3d6c09cb5aed291f77900efa6d880089 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 5 Mar 2001 20:57:39 +0000 Subject: [PATCH] * localaddr.c (krb5_os_localaddr): Don't look for -1 return value from foreach_localaddr. (print_addr): Only process AF_INET6 addresses if AF_INET6 is defined. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13056 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 5 +++++ src/lib/krb5/os/localaddr.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 92e14c564..c086048a7 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,5 +1,10 @@ 2001-03-05 Ken Raeburn + * localaddr.c (krb5_os_localaddr): Don't look for -1 return value + from foreach_localaddr. + (print_addr): Only process AF_INET6 addresses if AF_INET6 is + defined. + * gmt_mktime.c (gmt_mktime): Handle years earlier than 1970. (main) [TEST_LEAP]: New routine, driver for testing. * Makefile.in (t_mktime): New target. diff --git a/src/lib/krb5/os/localaddr.c b/src/lib/krb5/os/localaddr.c index bcb861eb6..82c5863f9 100644 --- a/src/lib/krb5/os/localaddr.c +++ b/src/lib/krb5/os/localaddr.c @@ -499,12 +499,14 @@ static int print_addr (/*@unused@*/ void *dataptr, struct sockaddr *sa) printf ("addr %s\n", inet_ntoa (((struct sockaddr_in *)sa)->sin_addr)); break; +#ifdef AF_INET6 case AF_INET6: printf ("addr %s\n", inet_ntop (sa->sa_family, &((struct sockaddr_in6 *)sa)->sin6_addr, buf, sizeof (buf))); break; +#endif #ifdef AF_LINK case AF_LINK: printf ("linkaddr\n"); @@ -679,7 +681,7 @@ krb5_os_localaddr(context, addr) krb5_xfree (data.addr_temp[i]); free (data.addr_temp); } - if (r == -1 && data.mem_err) + if (data.mem_err) return ENOMEM; else return r; -- 2.26.2