From 7a93c827f353e2ad695d8019ab789b02a3596f2e Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 4 Dec 2011 23:15:13 -0500 Subject: [PATCH] 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 --- src/afs/afs_conn.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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(); } -- 2.39.5