are passed to fwdStart() with client_address == no_addr.
/*
- * $Id: asn.cc,v 1.46 1998/08/21 03:25:28 wessels Exp $
+ * $Id: asn.cc,v 1.47 1998/09/01 23:31:22 wessels Exp $
*
* DEBUG: section 53 AS Number handling
* AUTHOR: Duane Wessels, Kostas Anagnostakis
if ((e = storeGet(k)) == NULL) {
e = storeCreateEntry(asres, asres, null_request_flags, METHOD_GET);
storeClientListAdd(e, asState);
- fwdStart(-1, e, asState->request, any_addr);
+ fwdStart(-1, e, asState->request, no_addr);
} else {
storeLockObject(e);
storeClientListAdd(e, asState);
/*
- * $Id: forward.cc,v 1.25 1998/08/19 06:05:52 wessels Exp $
+ * $Id: forward.cc,v 1.26 1998/09/01 23:31:23 wessels Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
aclCheck_t ch;
int answer;
ErrorState *err;
- /*
- * Check if this host is allowed to fetch MISSES from us (miss_access)
+ /*
+ * peer_addr == no_addr indicates this is an "internal" request
+ * from peer_digest.c, asn.c, netdb.c, etc and should always
+ * be allowed. yuck, I know.
*/
- memset(&ch, '\0', sizeof(aclCheck_t));
- ch.src_addr = peer_addr;
- ch.request = r;
- answer = aclCheckFast(Config.accessList.miss, &ch);
- if (answer == 0) {
- err = errorCon(ERR_FORWARDING_DENIED, HTTP_FORBIDDEN);
- err->request = requestLink(r);
- err->src_addr = peer_addr;
- errorAppendEntry(e, err);
- return;
+ if (peer_addr.s_addr != no_addr.s_addr) {
+ /*
+ * Check if this host is allowed to fetch MISSES from us (miss_access)
+ */
+ memset(&ch, '\0', sizeof(aclCheck_t));
+ ch.src_addr = peer_addr;
+ ch.request = r;
+ answer = aclCheckFast(Config.accessList.miss, &ch);
+ if (answer == 0) {
+ err = errorCon(ERR_FORWARDING_DENIED, HTTP_FORBIDDEN);
+ err->request = requestLink(r);
+ err->src_addr = peer_addr;
+ errorAppendEntry(e, err);
+ return;
+ }
}
debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e));
e->mem_obj->request = requestLink(r);
/*
- * $Id: net_db.cc,v 1.125 1998/08/25 19:09:20 wessels Exp $
+ * $Id: net_db.cc,v 1.126 1998/09/01 23:31:24 wessels Exp $
*
* DEBUG: section 38 Network Measurement Database
* AUTHOR: Duane Wessels
storeClientCopy(ex->e, ex->seen, ex->used, ex->buf_sz,
ex->buf, netdbExchangeHandleReply, ex);
ex->r->flags.loopdetect = 1; /* cheat! -- force direct */
- fwdStart(-1, ex->e, ex->r, any_addr);
+ fwdStart(-1, ex->e, ex->r, no_addr);
#endif
}
/*
- * $Id: peer_digest.cc,v 1.45 1998/08/21 03:15:20 wessels Exp $
+ * $Id: peer_digest.cc,v 1.46 1998/09/01 23:31:25 wessels Exp $
*
* DEBUG: section 72 Peer Digest Routines
* AUTHOR: Alex Rousskov
fetch->offset = 0;
debug(72, 3) ("peerDigestRequest: forwarding to fwdStart...\n");
/* push towards peer cache */
- fwdStart(-1, e, req, any_addr);
+ fwdStart(-1, e, req, no_addr);
storeClientCopy(e, 0, 0, SM_PAGE_SIZE, memAllocate(MEM_4K_BUF),
peerDigestFetchReply, fetch);
}
/*
*
- * $Id: urn.cc,v 1.43 1998/08/21 03:15:29 wessels Exp $
+ * $Id: urn.cc,v 1.44 1998/09/01 23:31:25 wessels Exp $
*
* DEBUG: section 52 URN Parsing
* AUTHOR: Kostas Anagnostakis
if ((urlres_e = storeGet(k)) == NULL) {
urlres_e = storeCreateEntry(urlres, urlres, null_request_flags, METHOD_GET);
storeClientListAdd(urlres_e, urnState);
- fwdStart(-1, urlres_e, urlres_r, any_addr);
+ fwdStart(-1, urlres_e, urlres_r, no_addr);
} else {
storeLockObject(urlres_e);
storeClientListAdd(urlres_e, urnState);