Permit DNS SRV record lookups to be used by the Windows afsconf_GetAfsdbInfo
[openafs.git] / src / WINNT / afsd / cm_server.c
index f1f9998..b83eb4e 100644 (file)
@@ -971,7 +971,8 @@ cm_server_t *cm_FindServer(struct sockaddr_in *addrp, int type)
     lock_ObtainRead(&cm_serverLock);
     for (tsp = cm_allServersp; tsp; tsp=tsp->allNextp) {
         if (tsp->type == type &&
-            tsp->addr.sin_addr.s_addr == addrp->sin_addr.s_addr) 
+            tsp->addr.sin_addr.s_addr == addrp->sin_addr.s_addr &&
+            (tsp->addr.sin_port == addrp->sin_port || tsp->addr.sin_port == 0))
             break;
     }