Windows: apply Nat Pings only to cm_rootUser connections
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 3 Dec 2011 22:49:47 +0000 (17:49 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sun, 4 Dec 2011 02:12:07 +0000 (18:12 -0800)
Use CM_UCELLFLAG_ROOTUSER flag to identify the cm_rootUser
connections and only apply Nat pings to those connections
instead of examining the security state of the connection.

Change-Id: I978501972509d1e58b08b630e1ff046b404e59d8
Reviewed-on: http://gerrit.openafs.org/6208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/afsd/cm_conn.c

index c737b20..15ec650 100644 (file)
@@ -1256,8 +1256,10 @@ static void cm_NewRXConnection(cm_conn_t *tcp, cm_ucell_t *ucellp,
      * Only file servers implement client callbacks and we only need one ping
      * to be sent to each server.
      */
-    if (NatPingInterval && serverp->type == CM_SERVER_FILE && secIndex == 0)
+    if (NatPingInterval && serverp->type == CM_SERVER_FILE &&
+         (ucellp->flags & CM_UCELLFLAG_ROOTUSER)) {
         rx_SetConnSecondsUntilNatPing(tcp->rxconnp, NatPingInterval);
+    }
 
     tcp->ucgen = ucellp->gen;
     if (secObjp)