[SCM] Samba Shared Repository - branch master updated

simo idra at samba.org
Wed Jun 9 18:21:34 MDT 2010


On Wed, 2010-06-09 at 19:09 -0500, Jeremy Allison wrote:
> The branch, master has been updated
>        via  efd0c35... Ensure we don't send SMB1 keepalives on an SMB2 connection.
>       from  09e74b6... Split out the "finished read processing" code into a function so it can be called by both sync and async code.
> 
> http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
> 
> 
> - Log -----------------------------------------------------------------
> commit efd0c35a7e195865b18ce75bf2d592aaf1724d7d
> Author: Jeremy Allison <jra at samba.org>
> Date:   Wed Jun 9 17:08:41 2010 -0700
> 
>     Ensure we don't send SMB1 keepalives on an SMB2 connection.
>     
>     Jeremy.
> 
> -----------------------------------------------------------------------
> 
> Summary of changes:
>  source3/smbd/process.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> 
> Changeset truncated at 500 lines:
> 
> diff --git a/source3/smbd/process.c b/source3/smbd/process.c
> index 3396f89..f032e6a 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);
> 
> 

The semantics of this allow_smb2 flag are becoming bizarre, are you sure
you don't want to use a separate variable ?

As far as I can understand allow_smb2 is true as soon as someone sets
max protocol = smb2, so this means you are disabling SMB1 keep alives
also on SMB1 connections just because the server supports SMB2 ?

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-cvs mailing list