From: Jeffrey Altman Date: Mon, 5 Dec 2011 04:15:13 +0000 (-0500) Subject: afs: prevent nat pings on destroyed connections X-Git-Tag: upstream/1.8.0_pre1^2~2960 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7a93c827f353e2ad695d8019ab789b02a3596f2e;p=packages%2Fo%2Fopenafs.git afs: prevent nat pings on destroyed connections If the connection is no longer in use, reset the nat keep alive timer to 0 seconds. Change-Id: I72b69979fb8b15ab5afaa654b317edc254253b4b Reviewed-on: http://gerrit.openafs.org/6230 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_conn.c b/src/afs/afs_conn.c index f63ac633f..a136c8d13 100644 --- a/src/afs/afs_conn.c +++ b/src/afs/afs_conn.c @@ -146,8 +146,10 @@ release_conns_user_server(struct unixuser *xu, struct server *xs) AFS_GUNLOCK(); for(cix = 0; cix < CVEC_LEN; ++cix) { tc = &(tcv->cvec[cix]); - if (tc->activated) + if (tc->activated) { + rx_SetConnSecondsUntilNatPing(tc->id, 0); rx_DestroyConnection(tc->id); + } } if (glocked) AFS_GLOCK(); @@ -175,8 +177,10 @@ release_conns_vector(struct sa_conn_vector *xcv) AFS_GUNLOCK(); \ for(cix = 0; cix < CVEC_LEN; ++cix) { tc = &(tcv->cvec[cix]); - if (tc->activated) - rx_DestroyConnection( tc->id ); + if (tc->activated) { + rx_SetConnSecondsUntilNatPing(tc->id, 0); + rx_DestroyConnection(tc->id); + } } if (glocked) AFS_GLOCK(); @@ -431,7 +435,8 @@ afs_ConnBySA(struct srvAddr *sap, unsigned short aport, afs_int32 acell, if (tc->id) { if (glocked) AFS_GUNLOCK(); - rx_DestroyConnection(tc->id); + rx_SetConnSecondsUntilNatPing(tc->id, 0); + rx_DestroyConnection(tc->id); if (glocked) AFS_GLOCK(); }