Re: Netfilter module help

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

 



Hi Jan,
Thanks for your quick reply. Could you please give me some advices to
accomplish the task? I need to pass the packet from kernel to a user
space process to decide if the packet is accepted or denied.
Best,
Tung.

On Wed, Jul 9, 2008 at 6:27 PM, Jan Engelhardt <jengelh@xxxxxxxxxx> wrote:
>
> On Thursday 2008-07-10 00:58, tung tran wrote:
>
>>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.
>
> You cannot sleep in an interrupt handler.
>
--
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