lkml.org 
[lkml]   [2007]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectSocket owner problem?
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.

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!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-09-11 09:47    [W:0.046 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site