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

Joakim Plate elupus at ecce.se
Wed Dec 27 09:31:40 GMT 2006


> 
> Please post the above text and code snippet with your fix, as a bugzilla bug.
> Mark it as a libsmbclient bug, and I'll take a look at it when I get a chance
> (hopefully reasonably soon).  I'll discuss with others whether there are
> alternative methods to solve the problem.
> 

How about doing it like this. Add a last use time to the connection cache, if
last use is longer ago than a minute (or perhaps longer or shorter, thou it
doesn't really matter), send an smb echo request. That way the connection will
be fully verified, but the overhead of that call is only in effect if the
connection has been dormant for a while. Aslong as the connection is in use,
it's more likely a dropped connection will occure during the actual command
instead of this houskeeping tests.

/Joakim



More information about the samba-technical mailing list