|
|||||||||||
|
telnet client does not time out even 'telnetd -k' has died.
From: Teh Kok How <khteh(at)willowglen.com.my>
Date: Wed Sep 17 2003 - 20:45:12 EDT
I posted to misc@ but haven't received any reply. I am not sure if this is the right place to post.
I made these changes in tcp_timer.h:
recompile and boot up the kernel. Then, I telnet from a to b. What happens on the telnet server (b) is that when the connection is idle with cable connected, SO_KEEPALIVE flag is set and keepalive probe packet is sent everyminute. When the cable is pulled out, after 1 minute tcp_timer_keep() routine is called with SO_KEEPALIVE flag set. Another 75 seconds later, the same routine is called with SO_KEEPALIVE set and goto dropit is called. So the connection drops successfully at the server. "telnetd -k" terminates. No problem at the server. However, what happens at the client (a) is that when the connection is idle with cable connected, the SO_KEEPALIVE flag is never set. I wonder how to set this flag at the client site. With the cable pulled out, nothing changes. telnet session stays indefinitely even after the server has died. So, my question is how to time out the telnet connection at the client site. Is it using the same mechanism as the server with SO_KEEPALIVE? If so, how to set the SO_KEEPALIVE flag with telnet command..? Thanks.
Regards,
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:48:44 EDT |
||||||||||
|
|||||||||||