--------------------- PatchSet 4114 Date: 2007/03/23 13:03:24 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Continue IPAddress rollout. Moving into fqdncache* Members: src/ACLChecklist.h:1.18.8.7->1.18.8.8 src/ACLDestinationDomain.cc:1.7.6.6->1.7.6.7 src/ACLSourceDomain.cc:1.3.12.3->1.3.12.4 src/fqdncache.cc:1.9.2.7->1.9.2.8 src/protos.h:1.48.4.8->1.48.4.9 Index: squid3/src/ACLChecklist.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLChecklist.h,v retrieving revision 1.18.8.7 retrieving revision 1.18.8.8 diff -u -r1.18.8.7 -r1.18.8.8 --- squid3/src/ACLChecklist.h 21 Mar 2007 08:55:09 -0000 1.18.8.7 +++ squid3/src/ACLChecklist.h 23 Mar 2007 13:03:24 -0000 1.18.8.8 @@ -1,6 +1,6 @@ /* - * $Id: ACLChecklist.h,v 1.18.8.7 2007/03/21 08:55:09 amosjeffries Exp $ + * $Id: ACLChecklist.h,v 1.18.8.8 2007/03/23 13:03:24 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -117,14 +117,10 @@ const acl_access *accessList; -// struct IN_ADDR src_addr; IPAddress src_addr; -// struct IN_ADDR dst_addr; IPAddress dst_addr; -// struct IN_ADDR my_addr; -// unsigned short my_port; IPAddress my_addr; HttpRequest *request; Index: squid3/src/ACLDestinationDomain.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLDestinationDomain.cc,v retrieving revision 1.7.6.6 retrieving revision 1.7.6.7 diff -u -r1.7.6.6 -r1.7.6.7 --- squid3/src/ACLDestinationDomain.cc 21 Mar 2007 08:55:10 -0000 1.7.6.6 +++ squid3/src/ACLDestinationDomain.cc 23 Mar 2007 13:03:25 -0000 1.7.6.7 @@ -1,5 +1,5 @@ /* - * $Id: ACLDestinationDomain.cc,v 1.7.6.6 2007/03/21 08:55:10 amosjeffries Exp $ + * $Id: ACLDestinationDomain.cc,v 1.7.6.7 2007/03/23 13:03:25 amosjeffries Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -50,11 +50,10 @@ } void -DestinationDomainLookup::checkForAsync(ACLChecklist *checklist)const +DestinationDomainLookup::checkForAsync(ACLChecklist *checklist) const { checklist->asyncInProgress(true); - /* FIXME INET6 : drop temp conversion */ struct IN_ADDR tmp; checklist->dst_addr.GetInAddr(tmp); - fqdncache_nbgethostbyaddr(tmp, LookupDone, checklist); + fqdncache_nbgethostbyaddr(checklist->dst_addr, LookupDone, checklist); } void Index: squid3/src/ACLSourceDomain.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLSourceDomain.cc,v retrieving revision 1.3.12.3 retrieving revision 1.3.12.4 diff -u -r1.3.12.3 -r1.3.12.4 --- squid3/src/ACLSourceDomain.cc 21 Mar 2007 08:55:10 -0000 1.3.12.3 +++ squid3/src/ACLSourceDomain.cc 23 Mar 2007 13:03:26 -0000 1.3.12.4 @@ -1,5 +1,5 @@ /* - * $Id: ACLSourceDomain.cc,v 1.3.12.3 2007/03/21 08:55:10 amosjeffries Exp $ + * $Id: ACLSourceDomain.cc,v 1.3.12.4 2007/03/23 13:03:26 amosjeffries Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -49,11 +49,10 @@ } void -SourceDomainLookup::checkForAsync(ACLChecklist *checklist)const +SourceDomainLookup::checkForAsync(ACLChecklist *checklist) const { checklist->asyncInProgress(true); - /* FIXME INET6 : drop temp conversion */ struct IN_ADDR tmp; checklist->src_addr.GetInAddr(tmp); - fqdncache_nbgethostbyaddr(tmp, LookupDone, checklist); + fqdncache_nbgethostbyaddr(checklist->src_addr, LookupDone, checklist); } void Index: squid3/src/fqdncache.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fqdncache.cc,v retrieving revision 1.9.2.7 retrieving revision 1.9.2.8 diff -u -r1.9.2.7 -r1.9.2.8 --- squid3/src/fqdncache.cc 5 Jan 2007 16:59:20 -0000 1.9.2.7 +++ squid3/src/fqdncache.cc 23 Mar 2007 13:03:28 -0000 1.9.2.8 @@ -1,6 +1,6 @@ /* - * $Id: fqdncache.cc,v 1.9.2.7 2007/01/05 16:59:20 hno Exp $ + * $Id: fqdncache.cc,v 1.9.2.8 2007/03/23 13:03:28 amosjeffries Exp $ * * DEBUG: section 35 FQDN Cache * AUTHOR: Harvest Derived @@ -442,12 +442,13 @@ void -fqdncache_nbgethostbyaddr(struct IN_ADDR addr, FQDNH * handler, void *handlerData) +fqdncache_nbgethostbyaddr(IPAddress &addr, FQDNH * handler, void *handlerData) { fqdncache_entry *f = NULL; - char *name = (char *)INET_NTOA(addr); + char name[MAX_IPSTRLEN]; generic_cbdata *c; assert(handler); + addr.NtoA(name,MAX_IPSTRLEN); debug(35, 4) ("fqdncache_nbgethostbyaddr: Name '%s'.\n", name); FqdncacheStats.requests++; @@ -500,8 +501,8 @@ dnsSubmit(hashKeyStr(&f->hash), fqdncacheHandleReply, c); #else - - idnsPTRLookup(addr, fqdncacheHandleReply, c); + /* FIXME INET6 : dro temp conversion. */ struct IN_ADDR tmp; addr.GetInAddr(tmp); + idnsPTRLookup(tmp, fqdncacheHandleReply, c); #endif } @@ -544,7 +545,6 @@ } const char * - fqdncache_gethostbyaddr(struct IN_ADDR addr, int flags) { char *name = (char *)INET_NTOA(addr); @@ -585,7 +585,11 @@ FqdncacheStats.misses++; if (flags & FQDN_LOOKUP_IF_MISS) - fqdncache_nbgethostbyaddr(addr, dummy_handler, NULL); + { + /* FIXME INET6 : drop temp conversion */ IPAddress tmp; + fqdncache_nbgethostbyaddr(tmp, dummy_handler, NULL); + /* FIXME INET6 : drop temp conversion */ tmp.GetInAddr(addr); + } return NULL; } Index: squid3/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/protos.h,v retrieving revision 1.48.4.8 retrieving revision 1.48.4.9 diff -u -r1.48.4.8 -r1.48.4.9 --- squid3/src/protos.h 3 Mar 2007 14:44:06 -0000 1.48.4.8 +++ squid3/src/protos.h 23 Mar 2007 13:03:29 -0000 1.48.4.9 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.48.4.8 2007/03/03 14:44:06 amosjeffries Exp $ + * $Id: protos.h,v 1.48.4.9 2007/03/23 13:03:29 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -164,7 +164,7 @@ SQUIDCEXTERN void filemapFreeMemory(fileMap *); -SQUIDCEXTERN void fqdncache_nbgethostbyaddr(struct IN_ADDR, FQDNH *, void *); +SQUIDCEXTERN void fqdncache_nbgethostbyaddr(IPAddress &, FQDNH *, void *); SQUIDCEXTERN const char *fqdncache_gethostbyaddr(struct IN_ADDR, int flags); SQUIDCEXTERN void fqdncache_init(void);