/* Exported variables */
afs_rwlock_t afs_xconn; /* allocation lock for new things */
afs_rwlock_t afs_xinterface; /* for multiple client address */
-afs_int32 cryptall = 0; /* encrypt all communications */
+afs_int32 cryptall = 1; /* encrypt all communications */
/* some connection macros */
*rxconn = NULL;
+ if (!sap || ((sap->sa_flags & SRVR_ISDOWN) && !force_if_down)) {
+ /* sa is known down, and we don't want to force it. */
+ return NULL;
+ }
+
/* find cached connection */
ObtainSharedLock(&afs_xconn, 15);
foundvec = 0;
return NULL;
}
+ if (tc->refCount > 10000) {
+ static int warned;
+ if (!warned) {
+ warned = 1;
+ afs_warn("afs: Very high afs_conn refCount detected (conn %p, count %d)\n",
+ tc, (int)tc->refCount);
+ afs_warn("afs: Trying to continue, but this may indicate an issue\n");
+ afs_warn("afs: that may eventually crash the machine. Please file\n");
+ afs_warn("afs: a bug report.\n");
+ }
+ }
+
if (tu->states & UTokensBad) {
/* we may still have an authenticated RPC connection here,
* we'll have to create a new, unauthenticated, connection.
* bad, but that's somewhat trickier, due to locking
* constraints (though not impossible).
*/
- if (tc->id && (rx_SecurityClassOf(tc->id) != 0)) {
+ if (tc->id && (rx_SecurityClassOf(tc->id) != RX_SECIDX_NULL)) {
tc->forceConnectFS = 1; /* force recreation of connection */
}
tu->states &= ~UHasTokens; /* remove the authentication info */
glocked = ISAFS_GLOCK();
if (tc->forceConnectFS) {
UpgradeSToWLock(&afs_xconn, 38);
- csec = (struct rx_securityClass *)0;
if (tc->id) {
if (sap->natping == tc)
sap->natping = NULL;
rx_SetConnHardDeadTime(tc->id, afs_rx_harddead);
}
- /* Setting idle dead time to non-zero activates RX_CALL_IDLE errors. */
+ /* Setting idle dead time to non-zero activates idle-dead
+ * RX_CALL_TIMEOUT errors. */
if (isrep)
rx_SetConnIdleDeadTime(tc->id, afs_rx_idledead_rep);
else