Re: tcp keepalive diff #2: always_keepalive

2011-06-15 Thread Stuart Henderson
On 2011/06/14 16:33, Stuart Henderson wrote: -#define TCPCTL_MAXID 22 +#define TCPCTL_ALWAYS_KEEPALIVE 22 /* assume SO_KEEPALIVE is always set */ +#define TCPCTL_MAXID 23 I wasn't going to post a followup just for this but seeing as a few people have mentioned it

tcp keepalive diff #2: always_keepalive

2011-06-14 Thread Stuart Henderson
add sysctl net.inet.tcp.always_keepalive, setting this to 1 acts as if SO_KEEPALIVE were set on all TCP sockets. based on code added to FreeBSD ~15 years ago, these days it's enabled by default there and in dfbsd, here I've left the default as being disabled. useful for a client machine behind a

Re: tcp keepalive diff #2: always_keepalive

2011-06-14 Thread Brynet
I haven't tested this yet, but it would be handy, I had to patch bitlbee to set the SO_KEEPALIVE option otherwise gtalk would keep reconnecting. -Bryan.