From deca334a5c9773f1b873b6260353c5c6cbab0af7 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 20 May 2010 11:27:10 -0400 Subject: [PATCH] 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 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/afs_conn.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/afs/afs_conn.c b/src/afs/afs_conn.c index 38cdf23d93..ce4dc0b76d 100644 --- a/src/afs/afs_conn.c +++ b/src/afs/afs_conn.c @@ -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)