From: Jeffrey Altman Date: Thu, 8 May 2008 22:18:56 +0000 (+0000) Subject: DEVEL15-viced-avoid-infinite-loop-with-altaddr-unset-20080508 X-Git-Tag: BP-openafs-devel-1_5_3x~2 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2a8bf34ce7ad3e1c6e50126d395b10ece4ee5559;p=packages%2Fo%2Fopenafs.git DEVEL15-viced-avoid-infinite-loop-with-altaddr-unset-20080508 LICENSE IPL10 if we return leaving a non HOSTDELETED host while it does not have ALTADDR set, a loop can happen. avoid it by simply setting ALTADDR again when we're done, if we believe some addresses are still good this is fine. (cherry picked from commit e6c818f070022529c362e42dfed340f54b2fd26e) --- diff --git a/src/viced/host.c b/src/viced/host.c index 031ee861a..0fcab929f 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -1565,6 +1565,7 @@ h_GetHost_r(struct rx_connection *tcon) */ removeAddress_r(host, haddr, hport); host->hostFlags &= ~HWHO_INPROGRESS; + host->hostFlags |= ALTADDR; h_Unlock_r(host); if (!held) h_Release_r(host); @@ -1600,6 +1601,7 @@ h_GetHost_r(struct rx_connection *tcon) removeAddress_r(host, host->host, host->port); } host->hostFlags &= ~HWHO_INPROGRESS; + host->hostFlags |= ALTADDR; h_Unlock_r(host); if (!held) h_Release_r(host); @@ -1669,6 +1671,7 @@ h_GetHost_r(struct rx_connection *tcon) afs_inet_ntoa_r(haddr, hoststr), ntohs(hport), code)); removeAddress_r(host, haddr, hport); host->hostFlags &= ~HWHO_INPROGRESS; + host->hostFlags |= ALTADDR; h_Unlock_r(host); if (!held) h_Release_r(host);