Connection timeouts under SMB2 and Samba 3.6.12

Richard Sharpe realrichardsharpe at gmail.com
Sun May 5 10:27:04 MDT 2013


On Sat, May 4, 2013 at 11:05 PM, Volker Lendecke
<Volker.Lendecke at sernet.de> wrote:
> On Sat, May 04, 2013 at 08:46:16PM -0700, Richard Sharpe wrote:
>> Hi folks,
>>
>> We are seeing smbds hanging around for a long time after the client
>> has rebooted. The timeout on the receive is around 1900 seconds.
>>
>> Has anyone used TCP-level keep-alives to reap smbds for clients that
>> have rebooted?
>
> Yes, sure. Under Linux, it's the TCP_KEEP* options.

These appear to be the constants under FreeBSD:

#define TCPTV_KEEP_INIT ( 75*hz)                /* initial connect keepalive */
#define TCPTV_KEEP_IDLE (120*60*hz)             /* dflt time before probing */
#define TCPTV_KEEPINTVL ( 75*hz)                /* default probe interval */
#define TCPTV_KEEPCNT   8                       /* max probes before drop */

There seems to be no support for these under Samba, but the simplest
way to support them would be to map the Samba defined ones to these at
the constant level. Eg,

#ifdef _FREEBSD_ /* or whatever */
#define TCP_KEEPINTVL TCPTV_KEEPINTVL
#endif

On the other hand, configure should probably search for these as well
and add the remappings to config.h.

Any comments?
-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list