<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hello,</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thank's for answer. I increased output level and get this :</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<blockquote style="margin-top:0;margin-bottom:0">
<div><span><span><br>
</span></span></div>
<div><span><span>2022/09/26 09:07:52.381| 44,3| peer_select.cc(163) peerSelect: CONNECT</span></span></div>
<div><span>2022/09/26 09:07:52.381| 44,3| peer_select.cc(472) peerSelectFoo: CONNECT api.gouv.fr</span></div>
<div><span>2022/09/26 09:07:52.381| 44,3| peer_select.cc(485) peerSelectFoo: peerSelectFoo:
</span><span style="color:#569cd6">direct</span><span> = DIRECT_UNKNOWN (never_direct to be checked)</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Checklist.cc(70) preCheck: 0x5653abfc4b68 checking slow rules</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Ip.cc(538) match: aclIpMatchIp: </span>
<span style="color:#ce9178">'10.25.41.21:34896'</span><span> found</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Acl.cc(151) matches: checked: </span><span style="color:#569cd6">all</span><span> = 1</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Acl.cc(151) matches: checked: never_direct</span><span style="color:#6a9955">#1 = 1</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Acl.cc(151) matches: checked: </span><span style="color:#569cd6">never_direct</span><span> = 1</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Checklist.cc(63) markFinished: 0x5653abfc4b68 answer ALLOWED for match</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Checklist.cc(163) checkCallback: ACLChecklist::checkCallback: 0x5653abfc4b68
</span><span style="color:#569cd6">answer</span><span>=ALLOWED</span></div>
<div><span>2022/09/26 09:07:52.381| 44,3| peer_select.cc(195) peerCheckNeverDirectDone: peerCheckNeverDirectDone: ALLOWED</span></div>
<div><span>2022/09/26 09:07:52.381| 44,3| peer_select.cc(201) peerCheckNeverDirectDone:
</span><span style="color:#569cd6">direct</span><span> = DIRECT_NO (never_direct allow)</span></div>
<div><span>2022/09/26 09:07:52.381| 44,3| peer_select.cc(472) peerSelectFoo: CONNECT api.gouv.fr</span></div>
<div>2022/09/26 09:07:52.381| 44,3| peer_select.cc(712) peerGetSomeParent: CONNECT api.gouv.fr<br>
</div>
<div><span>2022/09/26 09:07:52.381| 15,3| neighbors.cc(332) getRoundRobinParent: returning NULL</span></div>
<div><span>2022/09/26 09:07:52.381| 15,3| neighbors.cc(382) getWeightedRoundRobinParent: getWeightedRoundRobinParent: returning NULL</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Checklist.cc(70) preCheck: 0x7ffd6220f030 checking fast rules</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Ip.cc(538) match: aclIpMatchIp: </span>
<span style="color:#ce9178">'10.25.41.21:34896'</span><span> found</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Acl.cc(151) matches: checked: </span><span style="color:#569cd6">all</span><span> = 1</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Acl.cc(151) matches: checked: peer_access squid-2.inf-proxy03-d01.dc02</span><span style="color:#6a9955">#1 = 1</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Acl.cc(151) matches: checked: peer_access
</span><span style="color:#569cd6">squid-2.inf-proxy03-d01.dc02</span><span> = 1</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Checklist.cc(63) markFinished: 0x7ffd6220f030 answer ALLOWED for match</span></div>
<div><span>2022/09/26 09:07:52.381| 15,3| neighbors.cc(294) getFirstUpParent: getFirstUpParent: returning 10.26.8.10</span></div>
<div><span>2022/09/26 09:07:52.381| 44,3| peer_select.cc(978) peerAddFwdServer: adding FIRSTUP_PARENT/10.26.8.10</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Checklist.cc(70) preCheck: 0x7ffd6220f0d0 checking fast rules</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Ip.cc(538) match: aclIpMatchIp: </span>
<span style="color:#ce9178">'10.25.41.21:34896'</span><span> found</span></div>
<div><span>2022/09/26 09:07:52.381| 28,3| Acl.cc(151) matches: checked: </span><span style="color:#569cd6">all</span><span> = 1</span></div>
<div><span>2022/09/26 09:07:52.382| 28,3| Acl.cc(151) matches: checked: peer_access squid-2.inf-proxy03-d01.dc02</span><span style="color:#6a9955">#1 = 1</span></div>
<div><span>2022/09/26 09:07:52.382| 28,3| Acl.cc(151) matches: checked: peer_access
</span><span style="color:#569cd6">squid-2.inf-proxy03-d01.dc02</span><span> = 1</span></div>
<div><span>2022/09/26 09:07:52.382| 28,3| Checklist.cc(63) markFinished: 0x7ffd6220f0d0 answer ALLOWED for match</span></div>
<div><span>2022/09/26 09:07:52.382| 44,3| peer_select.cc(971) peerAddFwdServer: skipping ANY_OLD_PARENT/10.26.8.10</span><span style="color:#6a9955">; have FIRSTUP_PARENT/10.26.8.10</span></div>
<div><span>2022/09/26 09:07:52.382| 28,3| Checklist.cc(70) preCheck: 0x7ffd6220f0d0 checking fast rules</span></div>
<div><span>2022/09/26 09:07:52.382| 28,3| Ip.cc(538) match: aclIpMatchIp: </span>
<span style="color:#ce9178">'10.25.41.21:34896'</span><span> found</span></div>
<div><span>2022/09/26 09:07:52.382| 28,3| Acl.cc(151) matches: checked: </span><span style="color:#569cd6">all</span><span> = 1</span></div>
<div><span>2022/09/26 09:07:52.382| 28,3| Acl.cc(151) matches: checked: peer_access squid-2.inf-proxy03-d01.dc01</span><span style="color:#6a9955">#1 = 1</span></div>
<div><span>2022/09/26 09:07:52.382| 28,3| Acl.cc(151) matches: checked: peer_access
</span><span style="color:#569cd6">squid-2.inf-proxy03-d01.dc01</span><span> = 1</span></div>
<div><span>2022/09/26 09:07:52.382| 28,3| Checklist.cc(63) markFinished: 0x7ffd6220f0d0 answer ALLOWED for match</span></div>
<div><span>2022/09/26 09:07:52.382| 44,3| peer_select.cc(978) peerAddFwdServer: adding ANY_OLD_PARENT/127.0.0.1</span></div>
<div><span>2022/09/26 09:07:52.382| 15,3| neighbors.cc(472) getDefaultParent: getDefaultParent: returning NULL</span></div>
<div><span>2022/09/26 09:07:52.382| 44,2| peer_select.cc(295) peerSelectDnsPaths: Find IP destination for: api.gouv.fr:443</span><span style="color:#ce9178">' via 10.26.8.10</span></div>
<div><span style="color:#ce9178">2022/09/26 09:07:52.382| 44,2| peer_select.cc(295) peerSelectDnsPaths: Find IP destination for: api.gouv.fr:443'</span><span> via 127.0.0.1</span></div>
<div><span>2022/09/26 09:07:52.382| 44,2| peer_select.cc(316) peerSelectDnsPaths: Found sources for
</span><span style="color:#ce9178">'api.gouv.fr:443'</span></div>
<div><span>2022/09/26 09:07:52.382| 44,2| peer_select.cc(317) peerSelectDnsPaths:  
</span><span style="color:#569cd6">always_direct</span><span> = DENIED</span></div>
<div><span>2022/09/26 09:07:52.382| 44,2| peer_select.cc(318) peerSelectDnsPaths:    </span><span style="color:#569cd6">never_direct</span><span> = ALLOWED</span></div>
<div><span>2022/09/26 09:07:52.382| 44,2| peer_select.cc(328) peerSelectDnsPaths:      </span><span style="color:#569cd6">cache_peer</span><span> =
</span><span style="color:#569cd6">local</span><span>=0.0.0.0 </span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129
</span><span style="color:#569cd6">flags</span><span>=1</span></div>
<div><span>2022/09/26 09:07:52.382| 44,2| peer_select.cc(328) peerSelectDnsPaths:      </span><span style="color:#569cd6">cache_peer</span><span> =
</span><span style="color:#569cd6">local</span><span>=0.0.0.0 </span><span style="color:#569cd6">remote</span><span>=127.0.0.1:3129
</span><span style="color:#569cd6">flags</span><span>=1</span></div>
<div><span>2022/09/26 09:07:52.382| 44,2| peer_select.cc(331) peerSelectDnsPaths:        </span><span style="color:#569cd6">timedout</span><span> = 0</span></div>
<div><span>2022/09/26 09:07:52.382| 26,3| tunnel.cc(1249) tunnelPeerSelectComplete:
</span><span style="color:#569cd6">paths</span><span>=2, p[0]={</span><span style="color:#569cd6">local</span><span>=0.0.0.0
</span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 </span><span style="color:#569cd6">flags</span><span>=1}, serverDest[0]={</span><span style="color:#569cd6">local</span><span>=0.0.0.0
</span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 </span><span style="color:#569cd6">flags</span><span>=1}</span></div>
<div><span>2022/09/26 09:07:52.382| 17,3| FwdState.cc(1369) GetMarkingsToServer: from 0.0.0.0 netfilter mark 0</span></div>
<div><span>2022/09/26 09:07:52.382| 26,3| AsyncCall.cc(25) AsyncCall: The AsyncCall tunnelConnectDone constructed,
</span><span style="color:#569cd6">this</span><span>=0x5653abf924a0 [call164]</span></div>
<div><span>2022/09/26 09:07:52.382| 5,3| ConnOpener.cc(43) ConnOpener: will connect to
</span><span style="color:#569cd6">local</span><span>=0.0.0.0 </span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129
</span><span style="color:#569cd6">flags</span><span>=1 with 30 timeout</span></div>
<div><span>2022/09/26 09:07:52.382| 50,3| comm.cc(350) comm_openex: comm_openex: Attempt open socket for: 0.0.0.0</span></div>
<div><span>2022/09/26 09:07:52.382| 50,3| comm.cc(393) comm_openex: comm_openex: Opened socket
</span><span style="color:#569cd6">local</span><span>=0.0.0.0 </span><span style="color:#569cd6">remote</span><span>=[::] FD 14
</span><span style="color:#569cd6">flags</span><span>=1 : </span><span style="color:#569cd6">family</span><span>=2,
</span><span style="color:#569cd6">type</span><span>=1, </span><span style="color:#569cd6">protocol</span><span>=6</span></div>
<div><span>2022/09/26 09:07:52.382| 51,3| fd.cc(198) fd_open: fd_open() FD 14 api.gouv.fr:443</span></div>
<div><span>2022/09/26 09:07:52.382| 5,3| ConnOpener.cc(291) createFd: </span><span style="color:#569cd6">local</span><span>=0.0.0.0
</span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 </span><span style="color:#569cd6">flags</span><span>=1 will timeout in 30</span></div>
<div><span>2022/09/26 09:07:52.393| 26,3| AsyncCall.cc(92) ScheduleCall: ConnOpener.cc(139) will call tunnelConnectDone(</span><span style="color:#569cd6">local</span><span>=10.25.8.10:58500
</span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 FD 14 </span>
<span style="color:#569cd6">flags</span><span>=1, </span><span style="color:#569cd6">data</span><span>=0x5653abfa3598) [call164]</span></div>
<div><span>2022/09/26 09:07:52.393| 26,3| AsyncCallQueue.cc(55) fireNext: entering tunnelConnectDone(</span><span style="color:#569cd6">local</span><span>=10.25.8.10:58500
</span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 FD 14 </span>
<span style="color:#569cd6">flags</span><span>=1, </span><span style="color:#569cd6">data</span><span>=0x5653abfa3598)</span></div>
<div><span>2022/09/26 09:07:52.393| 26,3| AsyncCall.cc(37) make: make call tunnelConnectDone [call164]</span></div>
<div><span>2022/09/26 09:07:52.393| 14,3| Address.cc(382) lookupHostIP: Given Non-IP
</span><span style="color:#ce9178">'api.gouv.fr'</span><span>: Name or service not known</span></div>
<div><span>2022/09/26 09:07:52.393| 38,3| net_db.cc(355) netdbSendPing: netdbSendPing: pinging api.gouv.fr</span></div>
<div><span>2022/09/26 09:07:52.393| 37,2| IcmpSquid.cc(59) SendEcho:  Socket Closed. Aborted send to 10.26.8.10, opcode 3, len 10</span></div>
<div><span>2022/09/26 09:07:52.393| 26,3| tunnel.cc(1163) tunnelRelayConnectRequest:
</span><span style="color:#569cd6">local</span><span>=10.25.8.10:58500 </span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 FD 14
</span><span style="color:#569cd6">flags</span><span>=1, </span><span style="color:#569cd6">tunnelState</span><span>=0x5653abfa3598</span></div>
<div><span>2022/09/26 09:07:52.393| 22,3| refresh.cc(648) getMaxAge: getMaxAge: </span>
<span style="color:#ce9178">'api.gouv.fr:443'</span></div>
<div><span>2022/09/26 09:07:52.393| 11,2| tunnel.cc(1177) tunnelRelayConnectRequest: Tunnel Server REQUEST:
</span><span style="color:#569cd6">local</span><span>=10.25.8.10:58500 </span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 FD 14
</span><span style="color:#569cd6">flags</span><span>=1:</span></div>
<div><span>----------</span></div>
<div><span>CONNECT api.gouv.fr:443 HTTP/1.1</span></div>
<div><span>User-Agent: curl/7.52.1</span></div>
<div><span>Host: api.gouv.fr:443</span></div>
<div><span>X-Forwarded-For: unknown</span></div>
<div><span>Cache-Control: </span><span style="color:#569cd6">max-age</span><span>=259200</span></div>
<div><span>Connection: close</span></div>
<br>
<br>
<div><span>----------</span></div>
<div><span>2022/09/26 09:07:52.393| 5,3| comm.cc(559) commSetConnTimeout: </span>
<span style="color:#569cd6">local</span><span>=10.25.8.10:58500 </span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 FD 14
</span><span style="color:#569cd6">flags</span><span>=1 timeout 900</span></div>
<div><span>2022/09/26 09:07:52.393| 5,3| comm.cc(559) commSetConnTimeout: </span>
<span style="color:#569cd6">local</span><span>=10.25.8.10:58500 </span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 FD 14
</span><span style="color:#569cd6">flags</span><span>=1 timeout 900</span></div>
<div><span>2022/09/26 09:07:52.393| 26,3| AsyncCallQueue.cc(57) fireNext: leaving tunnelConnectDone(</span><span style="color:#569cd6">local</span><span>=10.25.8.10:58500
</span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 FD 14 </span>
<span style="color:#569cd6">flags</span><span>=1, </span><span style="color:#569cd6">data</span><span>=0x5653abfa3598)</span></div>
<div><span>2022/09/26 09:07:52.393| 5,3| IoCallback.cc(116) finish: called for </span>
<span style="color:#569cd6">local</span><span>=10.25.8.10:58500 </span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 FD 14
</span><span style="color:#569cd6">flags</span><span>=1 (0, 0)</span></div>
<div><span>2022/09/26 09:07:52.393| 26,3| tunnel.cc(929) tunnelConnectReqWriteDone:
</span><span style="color:#569cd6">local</span><span>=10.25.8.10:58500 </span><span style="color:#569cd6">remote</span><span>=10.26.8.10:3129 FD 14
</span><span style="color:#569cd6">flags</span><span>=1, </span><span style="color:#569cd6">flag</span><span>=0</span></div>
<div><span><br>
</span></div>
</blockquote>
</div>
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
It seems <i>peerGetSomeParent</i> is called and this method never issue an ICP :</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span><br>
</span></div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span>
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<blockquote style="margin-top:0;margin-bottom:0">
<div><span><span style="color:#569cd6"><br>
</span></span></div>
<div><span><span style="color:#569cd6">static</span><span> </span><span style="color:#569cd6">void</span></span></div>
<div><span style="color: rgb(220, 220, 170);">peerGetSomeParent</span>(ps_state * ps)<br>
</div>
<div><span>{</span></div>
<div><span>    CachePeer *p;</span></div>
<div><span>    HttpRequest *request = </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">request</span><span>;</span></div>
<div><span>    hier_code code = HIER_NONE;</span></div>
<div><span>    </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">method</span><span> <<
</span><span style="color:#ce9178">' '</span><span> << </span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">url</span><span>.</span><span style="color:#dcdcaa">host</span><span>());</span></div>
<div><span>                                                                               </span></div>
<div><span>    </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span> == DIRECT_YES)</span></div>
<div><span>        </span><span style="color:#c586c0">return</span><span>;</span></div>
<div><span>                </span></div>
<div><span>    </span><span style="color:#c586c0">if</span><span> ((p = </span><span style="color:#dcdcaa">peerSourceHashSelectParent</span><span>(request))) {</span></div>
<div><span>        code = SOURCEHASH_PARENT;</span></div>
<div><span style="color:#c586c0">#if</span><span style="color:#569cd6"> USE_AUTH</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> ((p =
</span><span style="color:#dcdcaa">peerUserHashSelectParent</span><span>(request))) {    </span></div>
<div><span>        code = USERHASH_PARENT;</span></div>
<div><span style="color:#c586c0">#endif</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> ((p =
</span><span style="color:#dcdcaa">carpSelectParent</span><span>(request))) {</span></div>
<div><span>        code = CARP;</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> ((p =
</span><span style="color:#dcdcaa">getRoundRobinParent</span><span>(request))) {</span></div>
<div><span>        code = ROUNDROBIN_PARENT;</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> ((p =
</span><span style="color:#dcdcaa">getWeightedRoundRobinParent</span><span>(request))) {</span></div>
<div><span>        code = ROUNDROBIN_PARENT;</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> ((p =
</span><span style="color:#dcdcaa">getFirstUpParent</span><span>(request))) {</span></div>
<div><span>        code = FIRSTUP_PARENT;</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> ((p =
</span><span style="color:#dcdcaa">getDefaultParent</span><span>(request))) {</span></div>
<div><span>        code = DEFAULT_PARENT;</span></div>
<div><span>    }</span></div>
<br>
<div><span>    </span><span style="color:#c586c0">if</span><span> (code != HIER_NONE) {</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerAddFwdServer</span><span>(ps, p, code);</span></div>
<div><span>    }</span></div>
<div><span>}</span></div>
<div><span><br>
</span></div>
</blockquote>
</div>
<br>
</span></div>
<div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Instead of <i>peerGetSomeNeighbor</i> :</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<blockquote style="margin-top:0;margin-bottom:0">
<div><span style="color:#6a9955"><br>
</span></div>
<div><span style="color:#6a9955">/**</span></div>
<div><span style="color:#6a9955"> * peerGetSomeNeighbor</span></div>
<div><span style="color:#6a9955"> *</span></div>
<div><span style="color:#6a9955"> * Selects a neighbor (parent or sibling) based on one of the</span></div>
<div><span style="color:#6a9955"> * following methods:</span></div>
<div><span style="color:#6a9955"> *      Cache Digests</span></div>
<div><span style="color:#6a9955"> *      CARP</span></div>
<div><span style="color:#6a9955"> *      ICMP Netdb RTT estimates</span></div>
<div><span style="color:#6a9955"> *      ICP/HTCP queries</span></div>
<div><span style="color:#6a9955"> */</span></div>
<div><span style="color:#569cd6">static</span><span> </span><span style="color:#569cd6">void</span></div>
<div><span style="color:#dcdcaa">peerGetSomeNeighbor</span><span>(ps_state * ps)</span></div>
<div><span>{</span></div>
<div><span>    StoreEntry *entry = </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">entry</span><span>;</span></div>
<div><span>    HttpRequest *request = </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">request</span><span>;</span></div>
<div><span>    CachePeer *p;</span></div>
<div><span>    hier_code code = HIER_NONE;</span></div>
<div><span>    </span><span style="color:#dcdcaa">assert</span><span>(</span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> == PING_NONE);</span></div>
<br>
<div><span>    </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span> == DIRECT_YES) {</span></div>
<div><span>        </span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> = PING_DONE;</span></div>
<div><span>        </span><span style="color:#c586c0">return</span><span>;</span></div>
<div><span>    }</span></div>
<br>
<div><span style="color:#c586c0">#if</span><span style="color:#569cd6"> USE_CACHE_DIGESTS</span></div>
<div><span>    </span><span style="color:#c586c0">if</span><span> ((p = </span><span style="color:#dcdcaa">neighborsDigestSelect</span><span>(request))) {</span></div>
<div><span>        </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#dcdcaa">neighborType</span><span>(p,
</span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">url</span><span>) == PEER_PARENT)</span></div>
<div><span>            code = CD_PARENT_HIT;</span></div>
<div><span>        </span><span style="color:#c586c0">else</span></div>
<div><span>            code = CD_SIBLING_HIT;</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span></div>
<div><span style="color:#c586c0">#endif</span></div>
<div><span>        </span><span style="color:#c586c0">if</span><span> ((p = </span>
<span style="color:#dcdcaa">netdbClosestParent</span><span>(request))) {</span></div>
<div><span>            code = CLOSEST_PARENT;</span></div>
<div><span>        } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#dcdcaa">peerSelectIcpPing</span><span>(request,
</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span>, entry)) {</span></div>
<div><span>            </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"peerSelect: Doing ICP pings"</span><span>);</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">ping</span><span>.</span><span style="color:#9cdcfe">start</span><span> = current_time;</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">ping</span><span>.</span><span style="color:#9cdcfe">n_sent</span><span> =
</span><span style="color:#dcdcaa">neighborsUdpPing</span><span>(request,</span></div>
<div><span>                                               entry,</span></div>
<div><span>                                               peerHandlePingReply,</span></div>
<div><span>                                               ps,</span></div>
<div><span>                                               &</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">ping</span><span>.</span><span style="color:#9cdcfe">n_replies_expected</span><span>,</span></div>
<div><span>                                               &</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">ping</span><span>.</span><span style="color:#9cdcfe">timeout</span><span>);</span></div>
<br>
<div><span>            </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">ping</span><span>.</span><span style="color:#9cdcfe">n_sent</span><span> ==
</span><span style="color:#b5cea8">0</span><span>)</span></div>
<div><span>                </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>, DBG_CRITICAL,
</span><span style="color:#ce9178">"WARNING: neighborsUdpPing returned 0"</span><span>);</span></div>
<div><span>            </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"peerSelect: "</span><span> <<
</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">ping</span><span>.</span><span style="color:#9cdcfe">n_replies_expected</span><span> <<</span></div>
<div><span>                   </span><span style="color:#ce9178">" ICP replies expected, RTT "</span><span> <<
</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">ping</span><span>.</span><span style="color:#9cdcfe">timeout</span><span> <<</span></div>
<div><span>                   </span><span style="color:#ce9178">" msec"</span><span>);</span></div>
<br>
<div><span>            </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">ping</span><span>.</span><span style="color:#9cdcfe">n_replies_expected</span><span> >
</span><span style="color:#b5cea8">0</span><span>) {</span></div>
<div><span>                </span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> = PING_WAITING;</span></div>
<div><span>                </span><span style="color:#dcdcaa">eventAdd</span><span>(</span><span style="color:#ce9178">"peerPingTimeout"</span><span>,</span></div>
<div><span>                         peerPingTimeout,</span></div>
<div><span>                         ps,</span></div>
<div><span>                         </span><span style="color:#b5cea8">0.001</span><span> *
</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">ping</span><span>.</span><span style="color:#9cdcfe">timeout</span><span>,</span></div>
<div><span>                         </span><span style="color:#b5cea8">0</span><span>);</span></div>
<div><span>                </span><span style="color:#c586c0">return</span><span>;</span></div>
<div><span>            }</span></div>
<div><span>        }</span></div>
<br>
<div><span>    </span><span style="color:#c586c0">if</span><span> (code != HIER_NONE) {</span></div>
<div><span>        </span><span style="color:#dcdcaa">assert</span><span>(p);</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerAddFwdServer</span><span>(ps, p, code);</span></div>
<div><span>    }</span></div>
<br>
<div><span>    </span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> = PING_DONE;</span></div>
<div><span>}</span></div>
<div><span><br>
</span></div>
</blockquote>
</div>
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
These functions are called from <i>peerSelectFoo</i> :</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<blockquote style="margin-top:0;margin-bottom:0">
<div><span style="color:#569cd6"><br>
</span></div>
<div><span style="color:#569cd6">static</span><span> </span><span style="color:#569cd6">void</span></div>
<div><span style="color:#dcdcaa">peerSelectFoo</span><span>(ps_state * ps)</span></div>
<div><span>{</span></div>
<div><span>    </span><span style="color:#c586c0">if</span><span> (!</span><span style="color:#dcdcaa">cbdataReferenceValid</span><span>(</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">callback_data</span><span>)) {</span></div>
<div><span>        </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"Aborting peer selection. Parent Job went away."</span><span>);</span></div>
<div><span>        </span><span style="color:#c586c0">delete</span><span> ps;</span></div>
<div><span>        </span><span style="color:#c586c0">return</span><span>;</span></div>
<div><span>    }</span></div>
<div><span> </span></div>
<div><span>    StoreEntry *entry = </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">entry</span><span>;</span></div>
<div><span>    HttpRequest *request = </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">request</span><span>;</span></div>
<div><span>    </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">method</span><span> <<
</span><span style="color:#ce9178">' '</span><span> << </span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">url</span><span>.</span><span style="color:#dcdcaa">host</span><span>());</span></div>
<div><span> </span></div>
<div><span style="color:#6a9955">    /** If we don't know whether DIRECT is permitted ... */</span></div>
<div><span>    </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span> == DIRECT_UNKNOWN) {</span></div>
<div><span>        </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">always_direct</span><span> == ACCESS_DUNNO) {</span></div>
<div><span>            </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"peerSelectFoo: direct = "</span><span> <<
</span><span style="color:#9cdcfe">DirectStr</span><span>[</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span>] <<
</span><span style="color:#ce9178">" (always_direct to be checked)"</span><span>);</span></div>
<div><span style="color:#6a9955">            /** check always_direct; */</span></div>
<div><span>            ACLFilledChecklist *ch = </span><span style="color:#c586c0">new</span><span> </span><span style="color:#dcdcaa">ACLFilledChecklist</span><span>(</span><span style="color:#9cdcfe">Config</span><span>.</span><span style="color:#9cdcfe">accessList</span><span>.</span><span style="color:#9cdcfe">AlwaysDirect</span><span>,
 request, </span><span style="color:#569cd6">NULL</span><span>);</span></div>
<div><span>            </span><span style="color:#9cdcfe">ch</span><span>-></span><span style="color:#9cdcfe">al</span><span> =
</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">al</span><span>;</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">acl_checklist</span><span> = ch;</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">acl_checklist</span><span>-></span><span style="color:#dcdcaa">nonBlockingCheck</span><span>(peerCheckAlwaysDirectDone, ps);</span></div>
<div><span>            </span><span style="color:#c586c0">return</span><span>;</span></div>
<div><span>        } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">never_direct</span><span> == ACCESS_DUNNO) {</span></div>
<div><span>            </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"peerSelectFoo: direct = "</span><span> <<
</span><span style="color:#9cdcfe">DirectStr</span><span>[</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span>] <<
</span><span style="color:#ce9178">" (never_direct to be checked)"</span><span>);</span></div>
<div><span style="color:#6a9955">            /** check never_direct; */</span></div>
<div><span>            ACLFilledChecklist *ch = </span><span style="color:#c586c0">new</span><span> </span><span style="color:#dcdcaa">ACLFilledChecklist</span><span>(</span><span style="color:#9cdcfe">Config</span><span>.</span><span style="color:#9cdcfe">accessList</span><span>.</span><span style="color:#9cdcfe">NeverDirect</span><span>,
 request, </span><span style="color:#569cd6">NULL</span><span>);</span></div>
<div><span>            </span><span style="color:#9cdcfe">ch</span><span>-></span><span style="color:#9cdcfe">al</span><span> =
</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">al</span><span>;</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">acl_checklist</span><span> = ch;</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">acl_checklist</span><span>-></span><span style="color:#dcdcaa">nonBlockingCheck</span><span>(peerCheckNeverDirectDone, ps);</span></div>
<div><span>            </span><span style="color:#c586c0">return</span><span>;</span></div>
<div><span>        } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">flags</span><span>.</span><span style="color:#9cdcfe">noDirect</span><span>)
 {</span></div>
<div><span style="color:#6a9955">            /** if we are accelerating, direct is not an option. */</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span> = DIRECT_NO;</span></div>
<div><span>            </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"peerSelectFoo: direct = "</span><span> <<
</span><span style="color:#9cdcfe">DirectStr</span><span>[</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span>] <<
</span><span style="color:#ce9178">" (forced non-direct)"</span><span>);</span></div>
<div><span>        } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">flags</span><span>.</span><span style="color:#9cdcfe">loopDetected</span><span>)
 {</span></div>
<div><span style="color:#6a9955">            /** if we are in a forwarding-loop, direct is not an option. */</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span> = DIRECT_YES;</span></div>
<div><span>            </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"peerSelectFoo: direct = "</span><span> <<
</span><span style="color:#9cdcfe">DirectStr</span><span>[</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span>] <<
</span><span style="color:#ce9178">" (forwarding loop detected)"</span><span>);</span></div>
<div><span>        } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#dcdcaa">peerCheckNetdbDirect</span><span>(ps)) {</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span> = DIRECT_YES;</span></div>
<div><span>            </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"peerSelectFoo: direct = "</span><span> <<
</span><span style="color:#9cdcfe">DirectStr</span><span>[</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span>] <<
</span><span style="color:#ce9178">" (checkNetdbDirect)"</span><span>);</span></div>
<div><span>        } </span><span style="color:#c586c0">else</span><span> {</span></div>
<div><span>            </span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span> = DIRECT_MAYBE;</span></div>
<div><span>            </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"peerSelectFoo: direct = "</span><span> <<
</span><span style="color:#9cdcfe">DirectStr</span><span>[</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span>] <<
</span><span style="color:#ce9178">" (default)"</span><span>);</span></div>
<div><span>        }</span></div>
<br>
<div><span>        </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">44</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#ce9178">"peerSelectFoo: direct = "</span><span> <<
</span><span style="color:#9cdcfe">DirectStr</span><span>[</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span>]);</span></div>
<div><span>    }</span></div>
<br>
<div><span>    </span><span style="color:#c586c0">if</span><span> (!entry || </span>
<span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> == PING_NONE)</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerSelectPinned</span><span>(ps);</span></div>
<div><span>    </span><span style="color:#c586c0">if</span><span> (entry == </span>
<span style="color:#569cd6">NULL</span><span>) {</span></div>
<div><span>        (</span><span style="color:#569cd6">void</span><span>) </span>
<span style="color:#b5cea8">0</span><span>;</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> == PING_NONE) {</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerGetSomeNeighbor</span><span>(ps);</span></div>
<br>
<div><span>        </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> == PING_WAITING)</span></div>
<div><span>            </span><span style="color:#c586c0">return</span><span>;</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> == PING_WAITING) {</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerGetSomeNeighborReplies</span><span>(ps);</span></div>
<div><span>        </span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> = PING_DONE;</span></div>
<div><span>    }</span></div>
<br>
<div><span>    </span><span style="color:#c586c0">switch</span><span> (</span><span style="color:#9cdcfe">ps</span><span>-></span><span style="color:#9cdcfe">direct</span><span>) {</span></div>
<br>
<div><span>    </span><span style="color:#c586c0">case</span><span> DIRECT_YES:</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerGetSomeDirect</span><span>(ps);</span></div>
<div><span>        </span><span style="color:#c586c0">break</span><span>;</span></div>
<br>
<div><span>    </span><span style="color:#c586c0">case</span><span> DIRECT_NO:</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerGetSomeParent</span><span>(ps);</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerGetAllParents</span><span>(ps);</span></div>
<div><span>        </span><span style="color:#c586c0">break</span><span>;</span></div>
<br>
<div><span>    </span><span style="color:#c586c0">default</span><span>:</span></div>
<br>
<div><span>        </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">Config</span><span>.</span><span style="color:#9cdcfe">onoff</span><span>.</span><span style="color:#9cdcfe">prefer_direct</span><span>)</span></div>
<div><span>            </span><span style="color:#dcdcaa">peerGetSomeDirect</span><span>(ps);</span></div>
<br>
<div><span>        </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">flags</span><span>.</span><span style="color:#9cdcfe">hierarchical</span><span> || !</span><span style="color:#9cdcfe">Config</span><span>.</span><span style="color:#9cdcfe">onoff</span><span>.</span><span style="color:#9cdcfe">nonhierarchical_direct</span><span>)
 {</span></div>
<div><span>            </span><span style="color:#dcdcaa">peerGetSomeParent</span><span>(ps);</span></div>
<div><span>            </span><span style="color:#dcdcaa">peerGetAllParents</span><span>(ps);</span></div>
<div><span>        }</span></div>
<br>
<div><span>        </span><span style="color:#c586c0">if</span><span> (!</span><span style="color:#9cdcfe">Config</span><span>.</span><span style="color:#9cdcfe">onoff</span><span>.</span><span style="color:#9cdcfe">prefer_direct</span><span>)</span></div>
<div><span>            </span><span style="color:#dcdcaa">peerGetSomeDirect</span><span>(ps);</span></div>
<br>
<div><span>        </span><span style="color:#c586c0">break</span><span>;</span></div>
<div><span>    }</span></div>
<br>
<div><span style="color:#6a9955">    // resolve the possible peers</span></div>
<div><span>    </span><span style="color:#dcdcaa">peerSelectDnsPaths</span><span>(ps);</span></div>
<div><span>}</span></div>
<div><span><br>
</span></div>
</blockquote>
</div>
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<i>entry</i> is <i>null</i> so <i>peerGetSomeNeighbor</i> is never called :</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<span><span>  </span></span></div>
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<span><span>    </span><span style="color:#c586c0">if</span><span> (entry == </span>
<span style="color:#569cd6">NULL</span><span>) {</span></span></div>
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<div><span>        (</span><span style="color:#569cd6">void</span><span>) </span>
<span style="color:#b5cea8">0</span><span>;</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> == PING_NONE) {</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerGetSomeNeighbor</span><span>(ps);</span></div>
<br>
<div><span>        </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> == PING_WAITING)</span></div>
<div><span>            </span><span style="color:#c586c0">return</span><span>;</span></div>
<div><span>    } </span><span style="color:#c586c0">else</span><span> </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> == PING_WAITING) {</span></div>
<div><span>        </span><span style="color:#dcdcaa">peerGetSomeNeighborReplies</span><span>(ps);</span></div>
<div><span>        </span><span style="color:#9cdcfe">entry</span><span>-></span><span style="color:#9cdcfe">ping_status</span><span> = PING_DONE;</span></div>
</div>
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<span><span>    }</span></span></div>
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<span><span><br>
</span></span></div>
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Because of <i>tunnelStart</i> method :</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'Droid Sans Mono', 'monospace', monospace;font-weight:normal;font-size:14px;line-height:19px">
<blockquote style="margin-top:0;margin-bottom:0">
<div><span style="color:#569cd6"><br>
</span></div>
<div><span style="color:#569cd6">void</span></div>
<div><span style="color:#dcdcaa">tunnelStart</span><span>(ClientHttpRequest * http)</span></div>
<div><span>{</span></div>
<div><span>    </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">26</span><span>,
</span><span style="color:#b5cea8">3</span><span>, HERE);</span></div>
<div><span style="color:#6a9955">    /* Create state structure. */</span></div>
<div><span>    TunnelStateData *tunnelState = </span><span style="color:#569cd6">NULL</span><span>;</span></div>
<div><span>    ErrorState *err = </span><span style="color:#569cd6">NULL</span><span>;</span></div>
<div><span>    HttpRequest *request = </span><span style="color:#9cdcfe">http</span><span>-></span><span style="color:#9cdcfe">request</span><span>;</span></div>
<div><span>    </span><span style="color:#569cd6">char</span><span> *url = </span>
<span style="color:#9cdcfe">http</span><span>-></span><span style="color:#9cdcfe">uri</span><span>;</span></div>
<br>
<div><span style="color:#6a9955">    /*</span></div>
<div><span style="color:#6a9955">     * client_addr.isNoAddr()  indicates this is an "internal" request</span></div>
<div><span style="color:#6a9955">     * from peer_digest.c, asn.c, netdb.c, etc and should always</span></div>
<div><span style="color:#6a9955">     * be allowed.  yuck, I know.</span></div>
<div><span style="color:#6a9955">     */</span></div>
<br>
<div><span>    </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">Config</span><span>.</span><span style="color:#9cdcfe">accessList</span><span>.</span><span style="color:#9cdcfe">miss</span><span> && !</span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">client_addr</span><span>.</span><span style="color:#dcdcaa">isNoAddr</span><span>())
 {</span></div>
<div><span style="color:#6a9955">        /*</span></div>
<div><span style="color:#6a9955">         * Check if this host is allowed to fetch MISSES from us (miss_access)</span></div>
<div><span style="color:#6a9955">         * default is to allow.</span></div>
<div><span style="color:#6a9955">         */</span></div>
<div><span>        ACLFilledChecklist </span><span style="color:#dcdcaa">ch</span><span>(</span><span style="color:#9cdcfe">Config</span><span>.</span><span style="color:#9cdcfe">accessList</span><span>.</span><span style="color:#9cdcfe">miss</span><span>,
 request, </span><span style="color:#569cd6">NULL</span><span>);</span></div>
<div><span>        </span><span style="color:#9cdcfe">ch</span><span>.</span><span style="color:#9cdcfe">al</span><span> =
</span><span style="color:#9cdcfe">http</span><span>-></span><span style="color:#9cdcfe">al</span><span>;</span></div>
<div><span>        </span><span style="color:#9cdcfe">ch</span><span>.</span><span style="color:#9cdcfe">src_addr</span><span> =
</span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">client_addr</span><span>;</span></div>
<div><span>        </span><span style="color:#9cdcfe">ch</span><span>.</span><span style="color:#9cdcfe">my_addr</span><span> =
</span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">my_addr</span><span>;</span></div>
<div><span>        </span><span style="color:#9cdcfe">ch</span><span>.</span><span style="color:#dcdcaa">syncAle</span><span>(request,
</span><span style="color:#9cdcfe">http</span><span>-></span><span style="color:#9cdcfe">log_uri</span><span>);</span></div>
<div><span>        </span><span style="color:#c586c0">if</span><span> (</span><span style="color:#9cdcfe">ch</span><span>.</span><span style="color:#dcdcaa">fastCheck</span><span>().</span><span style="color:#dcdcaa">denied</span><span>()) {                
                                                                                                                                
</span></div>
<div><span>            </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">26</span><span>,
</span><span style="color:#b5cea8">4</span><span>, HERE << </span><span style="color:#ce9178">"MISS access forbidden."</span><span>);                                                                                                                          
</span></div>
<div><span>            err = </span><span style="color:#c586c0">new</span><span> </span><span style="color:#dcdcaa">ErrorState</span><span>(ERR_FORWARDING_DENIED,
</span><span style="color:#4ec9b0">Http</span><span>::scForbidden, request);                                                                                                  
</span></div>
<div><span>            </span><span style="color:#9cdcfe">http</span><span>-></span><span style="color:#9cdcfe">al</span><span>-></span><span style="color:#9cdcfe">http</span><span>.</span><span style="color:#9cdcfe">code</span><span> =
</span><span style="color:#4ec9b0">Http</span><span>::scForbidden;                                                                                                                                  
</span></div>
<div><span>            </span><span style="color:#dcdcaa">errorSend</span><span>(</span><span style="color:#9cdcfe">http</span><span>-></span><span style="color:#dcdcaa">getConn</span><span>()-></span><span style="color:#9cdcfe">clientConnection</span><span>,
 err);                                                                                                                        
</span></div>
<div><span>            </span><span style="color:#c586c0">return</span><span>;                                                                                                                                                                    </span></div>
<div><span>        }                                                                                                                                                                              </span></div>
<div><span>    }                                                                                                                                                                                  </span></div>
<div><span>                                                                                                                                                                                       </span></div>
<div><span>    </span><span style="color:#dcdcaa">debugs</span><span>(</span><span style="color:#b5cea8">26</span><span>,
</span><span style="color:#b5cea8">3</span><span>, </span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">method</span><span> <<
</span><span style="color:#ce9178">' '</span><span> << url << </span><span style="color:#ce9178">' '</span><span> <<
</span><span style="color:#9cdcfe">request</span><span>-></span><span style="color:#9cdcfe">http_ver</span><span>);                                                                                                          </span></div>
<div><span>    ++</span><span style="color:#9cdcfe">statCounter</span><span>.</span><span style="color:#9cdcfe">server</span><span>.</span><span style="color:#9cdcfe">all</span><span>.</span><span style="color:#9cdcfe">requests</span><span>;                
                                                                                                                                
</span></div>
<div><span>    ++</span><span style="color:#9cdcfe">statCounter</span><span>.</span><span style="color:#9cdcfe">server</span><span>.</span><span style="color:#9cdcfe">other</span><span>.</span><span style="color:#9cdcfe">requests</span><span>;</span></div>
<br>
<div><span>    tunnelState = </span><span style="color:#c586c0">new</span><span> </span><span style="color:#dcdcaa">TunnelStateData</span><span>(http);</span></div>
<div><span style="color:#c586c0">#if</span><span style="color:#569cd6"> USE_DELAY_POOLS</span></div>
<div><span style="color:#6a9955">    //server.setDelayId called from tunnelConnectDone after server side connection established</span></div>
<div><span style="color:#c586c0">#endif</span></div>
<br>
<div><span>    </span><span style="color:#dcdcaa">peerSelect</span><span>(&(</span><span style="color:#9cdcfe">tunnelState</span><span>-></span><span style="color:#9cdcfe">serverDestinations</span><span>), request,
</span><span style="color:#9cdcfe">http</span><span>-></span><span style="color:#9cdcfe">al</span><span>,</span></div>
<div><span>               </span><span style="color:#569cd6">NULL</span><span>,</span></div>
<div><span>               tunnelPeerSelectComplete,</span></div>
<div><span>               tunnelState);</span></div>
<div><span>}</span></div>
<div><span><br>
</span></div>
</blockquote>
</div>
<br>
</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Any ideas ?</div>
<div style="font-family: Verdana, Geneva, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Verdana, Geneva, sans-serif;">Regards,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin:0px;text-align:start;background-color:white"><span style="font-size: 11pt; color: rgb(0, 0, 0); font-family: Verdana, Geneva, sans-serif;">Théo BARRAGUÉ</span></div>
</div>
</div>
</div>
</div>
</body>
</html>