From: Stephen Hemminger <shemminger@linux-foundation.org>
To: "Alvin Valera" <alvinvalera@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Socket owner problem?
Date: Tue, 11 Sep 2007 14:13:22 +0200 [thread overview]
Message-ID: <20070911141322.1c62bc8b@oldman> (raw)
In-Reply-To: <8d33dcd40709110045v532e062ex7f05ac3ba9386161@mail.gmail.com>
On Tue, 11 Sep 2007 15:45:29 +0800
"Alvin Valera" <alvinvalera@gmail.com> wrote:
> I am currently writing a kernel module that will apply some delay to
> incoming packets. The module is implemented using netfilter hooked
> into the NF_IP_LOCAL_IN. Once the module receives a packet of interest
> from the lower layer, it will queue the packet (in it's own queue) and
> associate a kernel timer. Once the kernel timer expires, the packet is
> then propagated up the higher layer.
Can be done already with netem and ifb already.
Netfilter is intended for only yes/no decisions, not time alteration.
> The problem happens like this:
> Once the socket is closed by the user-space application, there are
> still packets left in the module's queue. Now, the moment the kernel
> timer expires and the module propagates those packets up into the
> higher layer, the system hangs.
>
> I've been searching for ways to determine if associated socket is
> closed. This way, if my module knows that the user-space already
> closed the socket, it will not propagate the packet up. Does anyone
> have a solution for this problem?
>
> Thanks!
Please put networking discussions on netdev@vger.kernel.org
prev parent reply other threads:[~2007-09-11 12:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1189496159.849702.82190@50g2000hsm.googlegroups.com>
2007-09-11 7:45 ` Socket owner problem? Alvin Valera
2007-09-11 8:01 ` David Schwartz
2007-09-11 8:38 ` Alvin Valera
2007-09-11 9:27 ` David Schwartz
2007-09-11 12:13 ` Stephen Hemminger [this message]
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=20070911141322.1c62bc8b@oldman \
--to=shemminger@linux-foundation.org \
--cc=alvinvalera@gmail.com \
--cc=netdev@vger.kernel.org \
/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.