viced: Enable NAT ping on hosts
authorAndrew Deason <adeason@sinenomine.net>
Thu, 12 May 2011 15:57:09 +0000 (10:57 -0500)
committerDerrick Brashear <shadow@dementia.org>
Sun, 15 May 2011 13:14:34 +0000 (06:14 -0700)
Turn on NAT ping on the Rx connection for the callback channel for
hosts. This should help improve behavior for clients behind NATs and
stateful firewalls, even for clients that predate NAT ping
functionality.

Change-Id: I0f8e801c2225560192de9c09bfa06d0387e29af3
Reviewed-on: http://gerrit.openafs.org/4646
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/viced/host.c

index 55daa8e..cf559e2 100644 (file)
@@ -745,6 +745,7 @@ h_SetupCallbackConn_r(struct host * host)
        rx_NewConnection(host->host, host->port, 1, sc, 0);
     rx_SetConnDeadTime(host->callback_rxcon, 50);
     rx_SetConnHardDeadTime(host->callback_rxcon, AFS_HARDDEADTIME);
+    rx_SetConnSecondsUntilNatPing(host->callback_rxcon, 20);
 }
 
 /* h_Lookup_r
@@ -1730,6 +1731,7 @@ h_GetHost_r(struct rx_connection *tcon)
             cb_in = rx_NewConnection(haddr, hport, 1, sc, 0);
             rx_SetConnDeadTime(cb_in, 50);
             rx_SetConnHardDeadTime(cb_in, AFS_HARDDEADTIME);
+           rx_SetConnSecondsUntilNatPing(cb_in, 20);
 
             code =
                 RXAFSCB_TellMeAboutYourself(cb_in, &interf, &caps);