]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Clean up relations between TCP probing and DNS checks of peers with no known addresses.
authorhno <>
Mon, 5 Feb 2007 22:16:31 +0000 (22:16 +0000)
committerhno <>
Mon, 5 Feb 2007 22:16:31 +0000 (22:16 +0000)
src/cache_cf.cc
src/neighbors.cc

index 227c22d90a45ef88952a75670b67757bfca33166..f52d26d7e11aaa47f6dadf2127442820604b22d0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.503 2006/12/24 13:43:08 serassio Exp $
+ * $Id: cache_cf.cc,v 1.504 2007/02/05 15:16:31 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -1651,8 +1651,6 @@ parse_peer(peer ** head)
 
     p->icp.version = ICP_VERSION_CURRENT;
 
-    p->tcp_up = PEER_TCP_MAGIC_COUNT;
-
     p->test_fd = -1;
 
 #if USE_CACHE_DIGESTS
index f3234d4da88bd6c37f3c9866a7f9687488d17662..83baf7631de5c3458931f8d94de46c33c22b16be 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: neighbors.cc,v 1.343 2006/12/24 13:43:08 serassio Exp $
+ * $Id: neighbors.cc,v 1.344 2007/02/05 15:16:31 hno Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -1328,6 +1328,8 @@ peerDNSConfigure(const ipcache_addrs * ia, void *data)
         return;
     }
 
+    p->tcp_up = PEER_TCP_MAGIC_COUNT;
+
     for (j = 0; j < (int) ia->count && j < PEER_MAX_ADDRESSES; j++) {
         p->addresses[j] = ia->in_addrs[j];
         debug(15, 2) ("--> IP address #%d: %s\n", j, inet_ntoa(p->addresses[j]));
@@ -1404,6 +1406,8 @@ peerConnectSucceded(peer * p)
         debug(15, 1) ("Detected REVIVED %s: %s\n",
                       neighborTypeStr(p), p->name);
         p->stats.logged_state = PEER_ALIVE;
+       if (!p->n_addresses)
+           ipcache_nbgethostbyname(p->host, peerDNSConfigure, p);
     }
 
     p->tcp_up = PEER_TCP_MAGIC_COUNT;