Index: squid/src/acl.c diff -c squid/src/acl.c:1.270.2.36 squid/src/acl.c:1.270.2.37 *** squid/src/acl.c:1.270.2.36 Wed Mar 30 15:46:41 2005 --- squid/src/acl.c Sun May 8 07:48:03 2005 *************** *** 3056,3065 **** for (next = buf; next < lim; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *) next; sin = (struct sockaddr_inarp *) (rtm + 1); - /*sdl = (struct sockaddr_dl *) (sin + 1); */ #define ROUNDUP(a) \ ((a)> 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) ! (char *) sdl = (char *) sin + ROUNDUP(sin->sin_len); if (c.s_addr == sin->sin_addr.s_addr) { if (sdl->sdl_alen) { arpReq.arp_ha.sa_len = sizeof(struct sockaddr); --- 3056,3064 ---- for (next = buf; next < lim; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *) next; sin = (struct sockaddr_inarp *) (rtm + 1); #define ROUNDUP(a) \ ((a)> 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) ! sdl = (struct sockaddr_dl *) ((char *) sin + ROUNDUP(sin->sin_len)); if (c.s_addr == sin->sin_addr.s_addr) { if (sdl->sdl_alen) { arpReq.arp_ha.sa_len = sizeof(struct sockaddr); *************** *** 3198,3205 **** while (*W != NULL) W = &(*W)->next; snprintf(buf, sizeof(buf), "%02x:%02x:%02x:%02x:%02x:%02x", ! arp->eth[0], arp->eth[1], arp->eth[2], arp->eth[3], ! arp->eth[4], arp->eth[5]); wordlistAdd(state, buf); } --- 3197,3205 ---- while (*W != NULL) W = &(*W)->next; snprintf(buf, sizeof(buf), "%02x:%02x:%02x:%02x:%02x:%02x", ! arp->eth[0] & 0xff, arp->eth[1] & 0xff, ! arp->eth[2] & 0xff, arp->eth[3] & 0xff, ! arp->eth[4] & 0xff, arp->eth[5] & 0xff); wordlistAdd(state, buf); } Index: squid/src/cf.data.pre diff -c squid/src/cf.data.pre:1.245.2.91 squid/src/cf.data.pre:1.245.2.92 *** squid/src/cf.data.pre:1.245.2.91 Fri Apr 22 14:29:29 2005 --- squid/src/cf.data.pre Sun May 8 07:48:03 2005 *************** *** 2010,2015 **** --- 2010,2024 ---- acl aclname dst ip-address/netmask ... (URL host's IP address) acl aclname myip ip-address/netmask ... (local socket IP address) + acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation) + # The arp ACL requires the special configure option --enable-arp-acl. + # Furthermore, the arp ACL code is not portable to all operating systems. + # It works on Linux, Solaris, FreeBSD and some other *BSD variants. + # + # NOTE: Squid can only determine the MAC address for clients that are on + # the same subnet. If the client is on a different subnet, then Squid cannot + # find out its MAC address. + acl aclname srcdomain .foo.com ... # reverse lookup, client IP acl aclname dstdomain .foo.com ... # Destination server from URL acl aclname srcdom_regex [-i] xxx ... # regex matching client name *************** *** 2126,2131 **** --- 2135,2141 ---- # external_acl_type directive. Examples: + acl macaddress arp 09:00:2b:23:45:67 acl myexample dst_as 1241 acl password proxy_auth REQUIRED acl fileupload req_mime_type -i ^multipart/form-data$