samba-technical@lists.samba.org
[Top] [All Lists]

Re: libsmbclient: Vista servers disconnect on netbios keepalive message

Subject: Re: libsmbclient: Vista servers disconnect on netbios keepalive message on port 445
From: Bjoern Jacke
Date: Wed, 27 Dec 2006 12:54:28 +0100
On Sun, Dec 24, 2006 at 02:47:46AM +0100, elupus wrote:
> If libsmbclient is connected to a vista server on port 445, only every
> second command will work. Before every command libsmbclient tries to verify
> that the server is valid by sending it a SMBkeepalive. However this is a
> netbios packet and can't be used on port 445 (smb over tcp). It seems
> previous windows version ignored this, vista however disconnects the client
> on such an invalid request.
> 
> I changed the smbc_check_server to only do the keepalive when connected on
> port 139

this is also an issue with XP, maybe 2k, too. smbd sends keepalive smb
packages to clients periodically causing the client to reset the
connection and reconnect. Your approach to check for port 139 when
sendinf smb keepalive packages looks reasonable. For smb via tcp no smb
keepalive should be needed as tcp can take care for keep alive for
itself.

Bjoern

<Prev in Thread] Current Thread [Next in Thread>