summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-06-09 17:08:41 -0700
committerJeremy Allison <jra@samba.org>2010-06-09 17:08:41 -0700
commitefd0c35a7e195865b18ce75bf2d592aaf1724d7d (patch)
tree72b6a3308b04edd66793ccebf7ebcee40614ea2e /source3/smbd
parent09e74b675fb9090c34f03e0894340cffcb501004 (diff)
downloadsamba-efd0c35a7e195865b18ce75bf2d592aaf1724d7d.tar.gz
samba-efd0c35a7e195865b18ce75bf2d592aaf1724d7d.tar.bz2
samba-efd0c35a7e195865b18ce75bf2d592aaf1724d7d.zip
Ensure we don't send SMB1 keepalives on an SMB2 connection.
Jeremy.
Diffstat (limited to 'source3/smbd')
-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);