cm_PutServer(tcp->serverp);
cm_ReleaseUser(userp);
*lcpp = tcp->nextp;
+ rx_SetConnSecondsUntilNatPing(tcp->rxconnp, 0);
rx_DestroyConnection(tcp->rxconnp);
lock_FinalizeMutex(&tcp->mx);
free(tcp);
rx_SetConnDeadTime(tcp->rxconnp, ConnDeadtimeout);
rx_SetConnHardDeadTime(tcp->rxconnp, HardDeadtimeout);
rx_SetConnIdleDeadTime(tcp->rxconnp, IdleDeadtimeout);
- if (NatPingInterval)
+
+ /*
+ * Attempt to limit NAT pings to the anonymous file server connections.
+ * Only file servers implement client callbacks and we only need one ping
+ * to be sent to each server.
+ */
+ if (NatPingInterval && serverp->type == CM_SERVER_FILE && secIndex == 0)
rx_SetConnSecondsUntilNatPing(tcp->rxconnp, NatPingInterval);
+
tcp->ucgen = ucellp->gen;
if (secObjp)
rxs_Release(secObjp); /* Decrement the initial refCount */
else
osi_Log0(afsd_logp, "cm_ConnByServer replace connection due to crypt change");
tcp->flags &= ~CM_CONN_FLAG_FORCE_NEW;
+ rx_SetConnSecondsUntilNatPing(tcp->rxconnp, 0);
rx_DestroyConnection(tcp->rxconnp);
cm_NewRXConnection(tcp, ucellp, serverp);
}