avoid nat ping for authenticated connections

this is a cheap way to ensure one nat ping per server. basically,
only do it for the one unauth connection we have.

Change-Id: I4583112d7b4a10a0e8f524795527d99a5b2adf51
Reviewed-on: http://gerrit.openafs.org/2010
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Derrick Brashear 2010-05-20 11:27:10 -04:00
parent 9f9ffb7822
commit deca334a5c

View File

@ -295,7 +295,12 @@ afs_ConnBySA(struct srvAddr *sap, unsigned short aport, afs_int32 acell,
}
rx_SetConnIdleDeadTime(tc->id, afs_rx_idledead);
rx_SetConnSecondsUntilNatPing(tc->id, 20);
/*
* Only do this for the base connection, not per-user.
* Will need to be revisited if/when CB gets security.
*/
if (isec == 0)
rx_SetConnSecondsUntilNatPing(tc->id, 20);
tc->forceConnectFS = 0; /* apparently we're appropriately connected now */
if (csec)