Problem with nf_register_hook

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

 



Hi list,
 
I am using Linux 2.6.9-42.7.EL kernel, And registering a function in netfilter like
 
nf_register_hook( &test );    and test is defined like....
 
static struct nf_hook_ops test
= { { NULL, NULL }, print_packet, PF_INET, NF_IP_LOCAL_IN, NF_IP_PRI_FILTER };
 
print_packet is defined like....
static unsigned int print_packet (unsigned int hook, struct sk_buff **pskb,
                const struct net_device *indev, const struct net_device *outdev,
                int (*okfn)(struct sk_buff *) ) {
 
}
 
PROBLEM: the registration of the function is successful.....
but I am not getting the local packets(destination ip is my ip) in this hook function (print_packet).
 
But I am able to see the packets meant for me in tcpdump and also in my application running in userspace.
 
This module works successfully in 2.4 kernel....
 
 

Can any one please help me to resolve the problem ?

 With Regards,
      kanhu

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux