]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
support src ACLs in cache_host_acl
authorwessels <>
Tue, 25 Feb 1997 03:21:37 +0000 (03:21 +0000)
committerwessels <>
Tue, 25 Feb 1997 03:21:37 +0000 (03:21 +0000)
src/client_side.cc
src/neighbors.cc

index cdef7ba27bc6f95b29b03876c96320eb41b63873..9278bab7fdc4f182d8a3f3eaab95d39d95baf7fa 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.89 1997/02/13 18:38:28 wessels Exp $
+ * $Id: client_side.cc,v 1.90 1997/02/24 20:21:37 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -159,6 +159,8 @@ clientAccessCheck(icpStateData * icpState, void (*handler) (icpStateData *, int)
            icpState->ident.ident,
            ICP_IDENT_SZ);
     }
+    /* This so we can have SRC ACLs for cache_host_acl. */
+    icpState->request->client_addr = icpState->peer.sin_addr;
 #if USE_PROXY_AUTH
     if (clientProxyAuthCheck(icpState) == 0) {
        char *wbuf = NULL;
index c293ec1e80dcf6a79e5d84ce5649698a4e09f86c..e49a96b5cff9b38d3440db10d7e7614cf527426f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: neighbors.cc,v 1.117 1997/02/23 09:05:20 wessels Exp $
+ * $Id: neighbors.cc,v 1.118 1997/02/24 20:21:38 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -233,7 +233,7 @@ peerAllowedToUse(const peer * e, request_t * request)
            return d->do_ping;
        do_ping = !d->do_ping;
     }
-    checklist.src_addr = any_addr;     /* XXX bogus! */
+    checklist.src_addr = request->client_addr;
     checklist.request = request;
     for (a = e->acls; a; a = a->next) {
        if (aclMatchAcl(a->acl, &checklist))
@@ -919,13 +919,15 @@ neighborAddAcl(const char *host, const char *aclname)
        xfree(L);
        return;
     }
+#ifdef NOW_SUPPORTED
     if (a->type == ACL_SRC_IP) {
        debug(15, 0, "%s line %d: %s\n",
            cfg_filename, config_lineno, config_input_line);
-       debug(15, 0, "neighborAddAcl: 'src' ALC's not supported for 'cache_host_acl'\n");
+       debug(15, 0, "neighborAddAcl: 'src' ACL's not supported for 'cache_host_acl'\n");
        xfree(L);
        return;
     }
+#endif
     L->acl = a;
     for (Tail = &(e->acls); *Tail; Tail = &((*Tail)->next));
     *Tail = L;