---------------------
PatchSet 4698 
Date: 2007/06/08 08:45:16
Author: amosjeffries
Branch: squid3-ipv6
Tag: (none) 
Log:
Drop some old old conversion points no longer needed.
Update notes.

Members: 
	NOTES-IPv6:1.1.2.32->1.1.2.33 
	src/htcp.cc:1.15.6.10->1.15.6.11 
	src/icp_v2.cc:1.17.8.18->1.17.8.19 
	src/redirect.cc:1.15.4.11->1.15.4.12 

Index: squid3/NOTES-IPv6
===================================================================
RCS file: /cvsroot/squid-sf//squid3/Attic/NOTES-IPv6,v
retrieving revision 1.1.2.32
retrieving revision 1.1.2.33
diff -u -r1.1.2.32 -r1.1.2.33
--- squid3/NOTES-IPv6	4 Jun 2007 06:54:25 -0000	1.1.2.32
+++ squid3/NOTES-IPv6	8 Jun 2007 08:45:16 -0000	1.1.2.33
@@ -1,4 +1,4 @@
-$Id: NOTES-IPv6,v 1.1.2.32 2007/06/04 06:54:25 amosjeffries Exp $
+$Id: NOTES-IPv6,v 1.1.2.33 2007/06/08 08:45:16 amosjeffries Exp $
 
 KNOWN BUGS:
 
@@ -23,62 +23,21 @@
 
 PROBLEM Segmentation Fault retrieving NtoA of address.
 Stack Trace:
-#3  0x08089301 in xassert (msg=0x814fa6a "false", file=0x8156cb0 "IPAddress.cc", line=893) at debug.cc:569
-#4  0x08129873 in IPAddress::NtoA (this=0x8560b28, buf=0xbf8a0d41 "", blen=75, force=None) at IPAddress.cc:893
-#5  0x08070d7f in clientdbEstablished (addr=@0x8560b28, delta=-1) at client_db.cc:153
-#6  0x08076c71 in ConnStateData::close (this=0x8560b08) at client_side.cc:602
-#7  0x08105a7d in commCallCloseHandlers (fd=19) at comm.cc:1472
-#8  0x0810a240 in _comm_close (fd=19, file=0x8135937 "client_side.cc", line=2638) at comm.cc:1647
-#9  0x0807194b in requestTimeout (fd=19, data=0x8560b08) at client_side.cc:2638
-#10 0x0810a72a in checkTimeouts () at comm.cc:2124
-#11 0x0810a88d in CommSelectEngine::checkEvents (this=0xbf8b0ffc, timeout=10) at comm.cc:2595
-#12 0x08091611 in EventLoop::checkEngine (this=0xbf8b0fbc, engine=0xbf8b0ffc, primary=true) at EventLoop.cc:50
-#13 0x080917aa in EventLoop::runOnce (this=0xbf8b0fbc) at EventLoop.cc:124
-#14 0x080918da in EventLoop::run (this=0xbf8b0fbc) at EventLoop.cc:100
-#15 0x080cb01e in main (argc=4, argv=0xbf8b10b4) at main.cc:1315
+#3  0x08089211 in xassert (msg=0x814fb8a "false", file=0x8156d90 "IPAddress.cc", line=893) at debug.cc:569
+#4  0x081299a3 in IPAddress::NtoA (this=0x8558a08, buf=0xbfa456e1 "", blen=75, force=None) at IPAddress.cc:893
+#5  0x08070c7f in clientdbEstablished (addr=@0x8558a08, delta=-1) at client_db.cc:153
+#6  0x08076b71 in ConnStateData::close (this=0x85589e8) at client_side.cc:602
+#7  0x08105b9d in commCallCloseHandlers (fd=15) at comm.cc:1471
+#8  0x0810a370 in _comm_close (fd=15, file=0x8135a77 "client_side.cc", line=2638) at comm.cc:1646
+#9  0x0807184b in requestTimeout (fd=15, data=0x85589e8) at client_side.cc:2638
+#10 0x0810a85a in checkTimeouts () at comm.cc:2123
+#11 0x0810a9bd in CommSelectEngine::checkEvents (this=0xbfa5599c, timeout=10) at comm.cc:2594
+#12 0x08091561 in EventLoop::checkEngine (this=0xbfa5595c, engine=0xbfa5599c, primary=true) at EventLoop.cc:50
+#13 0x080916fa in EventLoop::runOnce (this=0xbfa5595c) at EventLoop.cc:124
+#14 0x0809182a in EventLoop::run (this=0xbfa5595c) at EventLoop.cc:100
+#15 0x080cb0fe in main (argc=4, argv=0xbfa55a54) at main.cc:1315
 
-(repeated twice so far)
-
-PROBLEM: Segmentation fault retrieving hash key of address.
-Stack Trace:
-#0  0xb7d6c68a in strcmp () from /lib/tls/i686/cmov/libc.so.6
-#1  0x081284f3 in hash_lookup (hid=0x8346550, k=0x8573c58) at hash.c:191
-#2  0x0808b395 in idnsCachedLookup (key=<value optimized out>, callback=0, data=0x8573c58) at dns_internal.cc:1312
-#3  0x0808c4b3 in idnsALookup (name=0x8573c58 "shots.snap.com", callback=0x80c8040 <ipcacheHandleReply>, data=0x854c080)
-    at dns_internal.cc:1344
-#4  0x080d59bb in netdbPingSite (hostname=0x852e32c "shots.snap.com") at net_db.cc:946
-#5  0x08096f17 in FwdState::dispatch (this=0x85882a8) at forward.cc:938
-#6  0x08097bb3 in FwdState::connectStart (this=0x85882a8) at forward.cc:795
-#7  0x080da126 in peerSelectFoo (ps=0x858c358) at peer_select.cc:239
-#8  0x08052034 in ACLChecklist::checkCallback (this=0x85800e0, answer=ACCESS_ALLOWED) at ACLChecklist.cc:273
-#9  0x08052347 in ACLChecklist::check (this=0x85800e0) at ACLChecklist.cc:162
-#10 0x080da21c in peerSelectFoo (ps=0x858c358) at peer_select.cc:310
-#11 0x08098613 in FwdState::start (this=0x85882a8, aSelf=@0xbf8e6554) at forward.cc:121
-#12 0x080989ac in FwdState::fwdStart (client_fd=13, entry=0xb7c0c9ac, request=0x852e260) at forward.cc:276
-#13 0x0807e07b in clientReplyContext::processMiss (this=0xb7ac106c) at client_side_reply.cc:711
-#14 0x0807e75d in clientReplyContext::identifyStoreObject (this=0xb7ac106c) at client_side_reply.cc:1379
-#15 0x0808108f in ClientHttpRequest::httpStart (this=0x856cd30) at client_side_request.cc:911
-#16 0x08082005 in ClientHttpRequest::doCallouts (this=0x856cd30) at client_side_request.cc:1079
-#17 0x08052034 in ACLChecklist::checkCallback (this=0x8580010, answer=ACCESS_ALLOWED) at ACLChecklist.cc:273
-#18 0x0805221e in ACLChecklist::check (this=0x8580010) at ACLChecklist.cc:184
-#19 0x08081215 in ClientRequestContext::checkNoCache (this=0x857be70) at client_side_request.cc:859
-#20 0x08081e62 in ClientHttpRequest::doCallouts (this=0x856cd30) at client_side_request.cc:1052
-#21 0x08082d57 in ClientRequestContext::clientAccessCheckDone (this=0x857be70, answer=1) at client_side_request.cc:482
-#22 0x08052034 in ACLChecklist::checkCallback (this=0x857ff40, answer=ACCESS_ALLOWED) at ACLChecklist.cc:273
-#23 0x08052347 in ACLChecklist::check (this=0x857ff40) at ACLChecklist.cc:162
-#24 0x08081255 in ClientRequestContext::clientAccessCheck (this=0x857be70) at client_side_request.cc:390
-#25 0x08081b17 in ClientHttpRequest::doCallouts (this=0x856cd30) at client_side_request.cc:1015
-#26 0x08076414 in clientProcessRequest (conn=@0xbf8e6e84, hp=<value optimized out>, context=0xb7ae3044, method=METHOD_GET, http_ver=
-      {major = 1, minor = 1}) at client_side.cc:2276
-#27 0x08077b6d in clientParseRequest (conn=@0xbf8e6e84, do_next_read=@0xbf8e6e8b) at client_side.cc:2398
-#28 0x08078e84 in clientReadRequest (fd=13, buf=0xb7b87008 "GET http://shots.snap.com/shot_main_js/v2.7.2/ HTTP/1.1\r\nHost: shots.snap.com\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20061201 Firefox/2.0.0.3 (Ubuntu-feisty)\r\nAccept: *"..., size=475, flag=COMM_OK, xerrno=0, data=0x8560948)
-    at client_side.cc:2489
-#29 0x08106a7e in commio_call_callback (ccb=0x8320b38) at comm.cc:209
-#30 0x08106aaa in commio_call_callbacks () at comm.cc:219
-#31 0x08106ae0 in CommDispatcher::dispatch (this=0xbf8e7030) at comm.cc:2584
-#32 0x080917f4 in EventLoop::runOnce (this=0xbf8e6fec) at EventLoop.cc:131
-#33 0x080918da in EventLoop::run (this=0xbf8e6fec) at EventLoop.cc:100
-#34 0x080cb01e in main (argc=4, argv=0xbf8e70e4) at main.cc:1315
+(repeated x3 so far)
 
 
 PROBLEM: BUG 1965 - Memory Violation(s) in FwdState
Index: squid3/src/htcp.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/htcp.cc,v
retrieving revision 1.15.6.10
retrieving revision 1.15.6.11
diff -u -r1.15.6.10 -r1.15.6.11
--- squid3/src/htcp.cc	29 May 2007 13:42:03 -0000	1.15.6.10
+++ squid3/src/htcp.cc	8 Jun 2007 08:45:16 -0000	1.15.6.11
@@ -1,6 +1,6 @@
 
 /*
- * $Id: htcp.cc,v 1.15.6.10 2007/05/29 13:42:03 amosjeffries Exp $
+ * $Id: htcp.cc,v 1.15.6.11 2007/06/08 08:45:16 amosjeffries Exp $
  *
  * DEBUG: section 31    Hypertext Caching Protocol
  * AUTHOR: Duane Wesssels
@@ -1604,8 +1604,7 @@
         return;
     }
 
-/* FIXME INET6 : drop temp conversion. */ IPAddress tmp(p->in_addr);
-    htcpSend(pkt, (int) pktlen, tmp);
+    htcpSend(pkt, (int) pktlen, p->in_addr);
 
     queried_id[stuff.msg_id % N_QUERIED_KEYS] = stuff.msg_id;
     save_key = queried_keys[stuff.msg_id % N_QUERIED_KEYS];
Index: squid3/src/icp_v2.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/icp_v2.cc,v
retrieving revision 1.17.8.18
retrieving revision 1.17.8.19
diff -u -r1.17.8.18 -r1.17.8.19
--- squid3/src/icp_v2.cc	3 Jun 2007 12:14:48 -0000	1.17.8.18
+++ squid3/src/icp_v2.cc	8 Jun 2007 08:45:16 -0000	1.17.8.19
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v2.cc,v 1.17.8.18 2007/06/03 12:14:48 amosjeffries Exp $
+ * $Id: icp_v2.cc,v 1.17.8.19 2007/06/08 08:45:16 amosjeffries Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol (ICP)
  * AUTHOR: Duane Wessels
@@ -198,8 +198,7 @@
     while ((q = IcpQueueHead) != NULL) {
         delay = tvSubUsec(q->queue_time, current_time);
         /* increment delay to prevent looping */
-/* FIXME INET6 : drop temp conversion */ IPAddress tmp(q->address);
-        x = icpUdpSend(fd, tmp, (icp_common_t *) q->msg, q->logcode, ++delay);
+        x = icpUdpSend(fd, q->address, (icp_common_t *) q->msg, q->logcode, ++delay);
         IcpQueueHead = q->next;
         safe_free(q);
 
Index: squid3/src/redirect.cc
===================================================================
RCS file: /cvsroot/squid-sf//squid3/src/redirect.cc,v
retrieving revision 1.15.4.11
retrieving revision 1.15.4.12
diff -u -r1.15.4.11 -r1.15.4.12
--- squid3/src/redirect.cc	30 May 2007 05:06:09 -0000	1.15.4.11
+++ squid3/src/redirect.cc	8 Jun 2007 08:45:16 -0000	1.15.4.12
@@ -1,6 +1,6 @@
 
 /*
- * $Id: redirect.cc,v 1.15.4.11 2007/05/30 05:06:09 amosjeffries Exp $
+ * $Id: redirect.cc,v 1.15.4.12 2007/06/08 08:45:16 amosjeffries Exp $
  *
  * DEBUG: section 61    Redirector
  * AUTHOR: Duane Wessels
@@ -49,7 +49,7 @@
     void *data;
     char *orig_url;
 
-    struct IN_ADDR client_addr;
+    IPAddress client_addr;
     const char *client_ident;
     const char *method_s;
     RH *handler;
@@ -117,6 +117,7 @@
     redirectStateData *r = NULL;
     const char *fqdn;
     char buf[8192];
+    char ntoabuf[MAX_IPSTRLEN];
     assert(http);
     assert(handler);
     debugs(61, 5, "redirectStart: '" << http->uri << "'");
@@ -131,10 +132,9 @@
     r = cbdataAlloc(redirectStateData);
     r->orig_url = xstrdup(http->uri);
     if(conn != NULL)
-// FIXME INET6 : drop temp conversion should be:        r->client_addr = conn->log_addr;
-        conn->log_addr.GetInAddr(r->client_addr);
+        r->client_addr = conn->log_addr;
     else
-        r->client_addr = no_addr;
+        r->client_addr.SetNoAddr();
     r->client_ident = NULL;
 
     if (http->request->auth_user_request)
@@ -162,13 +162,12 @@
 
     r->data = cbdataReference(data);
 
-/* FIXME INET6 : drop temp conversion */ IPAddress tmpaddr(r->client_addr);
-    if ((fqdn = fqdncache_gethostbyaddr(tmpaddr, 0)) == NULL)
+    if ((fqdn = fqdncache_gethostbyaddr(r->client_addr, 0)) == NULL)
         fqdn = dash_str;
 
     snprintf(buf, 8192, "%s %s/%s %s %s\n",
              r->orig_url,
-             inet_ntoa(r->client_addr),
+             r->client_addr.NtoA(ntoabuf,MAX_IPSTRLEN),
              fqdn,
              r->client_ident[0] ? rfc1738_escape(r->client_ident) : dash_str,
              r->method_s);
