mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 08:50:00 -04:00
Ignore TCP dispatches in DNS_DISPATCHSTATE_NONE state
The TCP dispatches in DNS_DISPATCHSTATE_NONE could be either very fresh or those could be dispatches that failed connecting to the destination. Ignore them when trying to connect to an existing TCP dispatch via dns_dispatch_gettcp().
This commit is contained in:
parent
5cc12ab92c
commit
3edccaf0c7
1 changed files with 3 additions and 1 deletions
|
|
@ -1238,11 +1238,13 @@ dns_dispatch_gettcp(dns_dispatchmgr_t *mgr, const isc_sockaddr_t *destaddr,
|
|||
isc_sockaddr_eqaddr(localaddr, &sockname)))
|
||||
{
|
||||
switch (disp->state) {
|
||||
case DNS_DISPATCHSTATE_NONE:
|
||||
/* Dispatch in indeterminate state */
|
||||
break;
|
||||
case DNS_DISPATCHSTATE_CONNECTED:
|
||||
/* We found a connected dispatch */
|
||||
dns_dispatch_attach(disp, &disp_connected);
|
||||
break;
|
||||
case DNS_DISPATCHSTATE_NONE:
|
||||
case DNS_DISPATCHSTATE_CONNECTING:
|
||||
/* We found "a" dispatch, store it for later */
|
||||
if (disp_fallback == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue