* localaddr.c (foreach_localaddr) [HAVE_STRUCT_IF_LADDRCONF && 0]: Fix
authorKen Raeburn <raeburn@mit.edu>
Tue, 5 Oct 2004 21:24:01 +0000 (21:24 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 5 Oct 2004 21:24:01 +0000 (21:24 +0000)
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
src/lib/krb5/os/localaddr.c

index 0cfe729b76fe12b8ec6426b60089d1f66e4b882d..a1912bf49dd8a791edfc21a4f7f8838ce95171fc 100644 (file)
@@ -1,3 +1,10 @@
+2004-10-05  Ken Raeburn  <raeburn@mit.edu>
+
+       * 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  <raeburn@mit.edu>
 
        * localaddr.c (get_if_laddrconf, foreach_localaddr): New
index b526af5125a3f9daf16a5e4d0633082ef63156d7..62c168076a072f2e18a703bcc8cf8827d3ab013f 100644 (file)
@@ -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