From: wessels <> Date: Sat, 26 Sep 1998 00:31:27 +0000 (+0000) Subject: netdbGetClosestParent() needs to check the peer is really a parent X-Git-Tag: SQUID_3_0_PRE1~2625 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39b80cd0f934f3ca4e84f97a54cbef93edbfe313;p=thirdparty%2Fsquid.git netdbGetClosestParent() needs to check the peer is really a parent --- diff --git a/src/net_db.cc b/src/net_db.cc index bd233cd779..7fe425e868 100644 --- a/src/net_db.cc +++ b/src/net_db.cc @@ -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;