]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
netdbGetClosestParent() needs to check the peer is really a parent
authorwessels <>
Sat, 26 Sep 1998 00:31:27 +0000 (00:31 +0000)
committerwessels <>
Sat, 26 Sep 1998 00:31:27 +0000 (00:31 +0000)
src/net_db.cc

index bd233cd779f41b3332d2748b276b7658fff67846..7fe425e8683d84e63a45153febf10f14b70d2033 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.129 1998/09/23 21:29:29 glenn Exp $
+ * $Id: net_db.cc,v 1.130 1998/09/25 18:31:27 wessels Exp $
  *
  * DEBUG: section 38    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -1011,6 +1011,8 @@ netdbClosestParent(request_t * request)
        p = peerFindByName(h->peername);
        if (NULL == p)          /* not found */
            continue;
+       if (neighborType(p, request) != PEER_PARENT)
+           continue;
        if (!peerHTTPOkay(p, request))  /* not allowed */
            continue;
        return p;