Subject: silly project: tcp connections won't die
To: None <netbsd-help@NetBSD.ORG>
From: Andrew Brown <codewarrior@daemon.org>
List: netbsd-help
Date: 06/10/1997 18:35:27
every now and then, some tcp connections get "stuck" on my machine,
usually in the CLOSE_WAIT state.  the one i'm looking at now has been
there for about an hour and a half.  i could ignore it (but i don't
want to :), i could reboot to make it go away (but that seems
extreme), i could cruft together something to manufacture a reset
packet to make it go away (but that's not as much fun as...), or (i
figured) i could poke something in the kernel and make it go away
(time out).

so...i modified netstat to give me the tcp sequence and acknowledge
numbers (that would help with the third alternative) and familiarized
myself with the tcp code (briefly).

can i just use kvm_write(3) to write back a tcpcb with t_state and
some of t_timer changed so that it times out instantly, or is there a
better way to do something like this?

-- 
|-----< "CODE WARRIOR" >-----|
andrew@echonyc.com (TheMan)        * "ah!  i see you have the internet
codewarrior@daemon.org                               that goes *ping*!"
warfare@graffiti.com      * "information is power -- share the wealth."