]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-windows-rx-ehostunreach-20060116
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 16 Jan 2006 16:23:33 +0000 (16:23 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 16 Jan 2006 16:23:33 +0000 (16:23 +0000)
another location where EHOSTUNREACH can be returned
such that we can timeout the request immediately

(cherry picked from commit f7b9cd54e50e553486c2ad850df1a8ecaee0d954)

src/rx/rx_packet.c

index 614372c7b4cd2e7b36aca86f28a23535c98aaeb2..90f4d3361229e5541ec101da205de80889af7f5b 100644 (file)
@@ -2383,6 +2383,15 @@ rxi_SendPacketList(struct rx_call *call, struct rx_connection *conn,
                clock_Addmsec(&(p->retryTime),
                              10 + (((afs_uint32) p->backoff) << 8));
            }
+#ifdef AFS_NT40_ENV
+           /* Windows is nice -- it can tell us right away that we cannot
+            * reach this recipient by returning an WSAEHOSTUNREACH error
+            * code.  So, when this happens let's "down" the host NOW so
+            * we don't sit around waiting for this host to timeout later.
+            */
+           if (call && code == -1 && errno == WSAEHOSTUNREACH)
+               call->lastReceiveTime = 0;
+#endif
 #if defined(KERNEL) && defined(AFS_LINUX20_ENV)
            /* Linux is nice -- it can tell us right away that we cannot
             * reach this recipient by returning an ENETUNREACH error