From 8e1c0aaafe60f46a229c17721c95eadeac6c9b90 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 5 Oct 2004 21:24:01 +0000 Subject: [PATCH] * localaddr.c (foreach_localaddr) [HAVE_STRUCT_IF_LADDRCONF && 0]: Fix if_laddrreq.iflr_name field name not properly adjusted. The iflr_addr field is an HP-UX specific sockaddr_ext with sa_ field name prefixes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16804 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 7 +++++++ src/lib/krb5/os/localaddr.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 0cfe729b7..a1912bf49 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,10 @@ +2004-10-05 Ken Raeburn + + * localaddr.c (foreach_localaddr) [HAVE_STRUCT_IF_LADDRCONF && 0]: + Fix if_laddrreq.iflr_name field name not properly adjusted. The + iflr_addr field is an HP-UX specific sockaddr_ext with sa_ field + name prefixes. + 2004-10-01 Ken Raeburn * localaddr.c (get_if_laddrconf, foreach_localaddr): New diff --git a/src/lib/krb5/os/localaddr.c b/src/lib/krb5/os/localaddr.c index b526af512..62c168076 100644 --- a/src/lib/krb5/os/localaddr.c +++ b/src/lib/krb5/os/localaddr.c @@ -743,7 +743,7 @@ foreach_localaddr (/*@null@*/ void *data, for (i = 0; i < P.buf_size; i+= sizeof (*lifr)) { lifr = (struct if_laddrreq *)((caddr_t) P.buf+i); - strncpy(lifreq.iflr_name, lifr->iflc_name, + strncpy(lifreq.iflr_name, lifr->iflr_name, sizeof (lifreq.iflr_name)); Tprintf (("interface %s\n", lifreq.iflr_name)); /*@-moduncon@*/ /* ioctl unknown to lclint */ @@ -774,7 +774,7 @@ foreach_localaddr (/*@null@*/ void *data, lifr2 = (struct if_laddrreq *)((caddr_t) P.buf+j); if (lifr2->iflr_name[0] == '\0') continue; - if (lifr2->iflr_addr.ss_family == lifr->iflr_addr.ss_family + if (lifr2->iflr_addr.sa_family == lifr->iflr_addr.sa_family /* Compare address info. If this isn't good enough -- i.e., if random padding bytes turn out to differ when the addresses are the same -- then we'll have -- 2.26.2