Netfilter module help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
I am writing a kernel module that hooks into netfilter.
netfilter_ops.hook              =       main_hook;
netfilter_ops.pf                =       PF_INET;
netfilter_ops.hooknum           =       NF_IP_PRE_ROUTING;
netfilter_ops.priority          =       NF_IP_PRI_FIRST;
nf_register_hook(&netfilter_ops);

In the main_hook function, I needs to put the process to sleep and
will be woken up by another process because the decision to Accept or
Deny a packet depends on a process running in the user space. However,
all sleeping mechanism I tried  cause the kernel hang. I tried msleep,
wait_event_interrupt,wait_event_interrupt_timeout,... (of course I
have a process to wake up the main_hook process). I tested these
sleeping machenism in different modules and they worked fine. My
question is can we make the process sleep in the main_hook function
without causing the kernel hang and how to do it?
Thank you very much.
Tung.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux