summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/process.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 3396f89bc1..f032e6ab78 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2394,8 +2394,14 @@ static int client_get_tcp_info(struct sockaddr_storage *server,
*/
static bool keepalive_fn(const struct timeval *now, void *private_data)
{
+ struct smbd_server_connection *sconn = smbd_server_conn;
bool ret;
+ if (sconn->allow_smb2) {
+ /* Don't do keepalives on an SMB2 connection. */
+ return false;
+ }
+
smbd_lock_socket(smbd_server_conn);
ret = send_keepalive(smbd_server_fd());
smbd_unlock_socket(smbd_server_conn);