From: Derrick Brashear Date: Thu, 15 Jun 2006 16:12:13 +0000 (+0000) Subject: getaddr-avoid-looping-20060615 X-Git-Tag: BP-openafs-windows-kdfs-ifs~1269 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2e691074fb6ce70e8352da3e57a746a77f7489f1;p=packages%2Fo%2Fopenafs.git getaddr-avoid-looping-20060615 so it would be good to count these all off oops --- diff --git a/src/rx/rx_getaddr.c b/src/rx/rx_getaddr.c index 17993af1e..3f5390713 100644 --- a/src/rx/rx_getaddr.c +++ b/src/rx/rx_getaddr.c @@ -206,11 +206,13 @@ rx_getAllAddr_internal(afs_int32 buffer[], int maxSize, int loopbacks) if (count >= maxSize) /* no more space */ dpf(("Too many interfaces..ignoring 0x%x\n", a->sin_addr.s_addr)); - else if (!loopbacks && a->sin_addr.s_addr == htonl(0x7f000001)) + else if (!loopbacks && a->sin_addr.s_addr == htonl(0x7f000001)) { + addrcount--; continue; /* skip loopback address as well. */ - else if (loopbacks && ifm->ifm_flags & IFF_LOOPBACK) + } else if (loopbacks && ifm->ifm_flags & IFF_LOOPBACK) { + addrcount--; continue; /* skip aliased loopbacks as well. */ - else + } else buffer[count++] = a->sin_addr.s_addr; addrcount--; ifam = (struct ifa_msghdr *)((char *)ifam + ifam->ifam_msglen);