avoid nat ping for authenticated connections
authorDerrick Brashear <shadow@dementia.org>
Thu, 20 May 2010 15:27:10 +0000 (11:27 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 26 May 2010 19:05:03 +0000 (12:05 -0700)
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>

src/afs/afs_conn.c

index 38cdf23..ce4dc0b 100644 (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)