libsmbclient: Vista servers disconnect on netbios keepalive
message on port 445
Joakim Plate
elupus at ecce.se
Thu Dec 28 00:19:41 GMT 2006
<derrell <at> samba.org> writes:
>
> So I guess I have a couple of options: I could entirely remove the use of NBT
> keepalive requests, or I can use them only if the port is 445. Or, I can add
> those nefarious tests to determine which protocol set is being used.
>
I'd remove them, however after our first try, just ditching and checking
socket status by getpeername wasn't enough. XP servers silently drop the
connection after a timeout (hadn't set tcp keepalive thou).
I ended up working around it the way i mentioned in my other mail. By using
cli_echo if connection hasn't been used for a few seconds (10 in our case). If
the server drops the connection for some other reason other than timeout, it
can do it just as well during the actual command not during housekeeping, and
if we don't retry the command it won't be handled anyway. This way atleast the
silently dropped connections are caught.
/Joakim
More information about the samba-technical
mailing list