libsmbclient: Vista servers disconnect on netbios keepalive message on port 445

Bjoern Jacke bjacke at j3e.de
Wed Dec 27 11:54:28 GMT 2006


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


More information about the samba-technical mailing list