Linux Netfilter discussions
 help / color / mirror / Atom feed
* hook function in  NF_IP_LOCAL_IN does not interruptible_sleep_on?
@ 2002-09-15 11:13 Kim Jong Tae
  2002-09-15 14:05 ` Anders Fugmann
  2002-09-16  3:18 ` James Morris
  0 siblings, 2 replies; 4+ messages in thread
From: Kim Jong Tae @ 2002-09-15 11:13 UTC (permalink / raw)
  To: netfilter


Hi all.

I  makes hook function, which will communicate with user process
for each packet's arrival.
First, hook function sends data to user process and user process sends
back data. I think that before receiving data from user process, hook
function must wait.  hook func's wait is using interruptible_sleep_on.
When hook func call interruptible_sleep_on, system hangs!!!

code is below .

static unsigned int
enpia_dr_in(unsigned int hooknum,
                struct sk_buff **skb_p,
                const struct net_device *in,
                const struct net_device *out,
                int (*okfn)(struct sk_buff *))
{
....

        interruptible_sleep_on(waitq)
        /* this point system hangs, and console prints "killing interrupt
handler " */
...
}


static struct nf_hook_ops in_ops = {
        { NULL, NULL },
         hook_func, PF_INET, NF_IP_LOCAL_IN, 100
};

When hook fuction goes to interruptible_sleep_on, linux is down.
Same result comes when udp sock communication instead of
nf_register_sockopt.



Why this happens?

Is there a method to wait for some condition in netfilter hook func in  
linux kernel?

If it is impossible, is there another methods to communicate user process?

any comment is appreciate!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-16  3:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-15 11:13 hook function in NF_IP_LOCAL_IN does not interruptible_sleep_on? Kim Jong Tae
2002-09-15 14:05 ` Anders Fugmann
2002-09-16  0:58   ` Kim Jong Tae
2002-09-16  3:18 ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox