All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Killing a network connection
Date: Wed, 17 Oct 2007 20:44:21 -0400	[thread overview]
Message-ID: <4716AC65.2070608@tmr.com> (raw)
In-Reply-To: <jwvodf01b5i.fsf-monnier+gmane.linux.kernel@gnu.org>

Stefan Monnier wrote:
> [ I suppose this is not the best place to ask this, but
>   comp.os.linux.networking couldn't come up with a good answer and I can't
>   think of any intermediate step between these two groups ;-( ]
> 
> I'd like (as root, obviously) to kill some of the TCP connections visible
> in netstat.  I've found `tcpkill' and `cutter' but `cutter' only kills TCP
> connections that go *though* the machine (in my case, the machine is not
> a router, so there aren't any such thu connections anyway) and `tcpkill'
> can only kill the conection after seeing some activity (and it doesn't know
> to exit when the connections are killed).  Also those 2 tools seem
> just overkill.
> I'd like simply to do (metaphorically)
> 
>   rm /tcpfs/<foo>
> 
> so it should not need to involve *any* use of the TCP protocol: just kill it
> locally, warn the associated process(es), free the resources and let the
> other end deal with it.
> 
> The main use for me is to deal with dangling connections due to taking
> network interfaces up&down with different IP addresses (typically the wlan0
> interface where the IP is different because I've modes from an AP to
> another).  Of course, maybe there's another way to solve this particular
> problem, in case I'd like to hear about it as well.
> 
I'd like a way to just close TCP connections which are misbehaving in 
some way, not necessarily due to bad intent. I envision some tool which 
would take either IP or IP+port and send an RST to both ends. Yes, I 
could write one, but I bet someone already has. I did something similar 
a few years ago, but the requestor owns the code.

-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

  parent reply	other threads:[~2007-10-18  0:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15 18:40 Killing a network connection Stefan Monnier
2007-10-15 22:12 ` Andi Kleen
2007-10-16  3:15   ` Stefan Monnier
2007-10-18  0:44 ` Bill Davidsen [this message]
     [not found] <9eFcS-It-3@gated-at.bofh.it>
     [not found] ` <9eGsi-2Sr-35@gated-at.bofh.it>
2007-10-15 23:50   ` Bodo Eggert
2007-10-16  3:42     ` Stefan Monnier
2007-10-16  9:31     ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4716AC65.2070608@tmr.com \
    --to=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.