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

Bug#259608: Kernel -> Netfilter problem...



Package: kernel-image-2.4.18-k6
Version: 2.4.18-5

Hi,

We develop a software for network companies, and
recentily we getted a new client running Debian
servers, so we noted that one of our modules
(netfilter hook modules) doesn't compile over Debian.

So making basic tests like construct a basic netfilter
hook like that:

root@Debian:/tmp# cat nf.c
#define __KERNEL__
#define MODULE

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h>

static struct nf_hook_ops nfho;

unsigned int hook_func(unsigned int hooknum,
                       struct sk_buff **skb,
                       const struct net_device *in,
                       const struct net_device *out,
                       int (*okfn)(struct sk_buff *))
{
    return NF_DROP;
}


int init_module()
{
    nfho.hook = hook_func;        
    nfho.hooknum  = NF_IP_PRE_ROUTING;
    nfho.pf       = PF_INET;
    nfho.priority = NF_IP_PRI_FIRST;

    nf_register_hook(&nfho);
    
    return 0;
}
	

void cleanup_module()
{
    nf_unregister_hook(&nfho);
}

So when compiling we get this error:

root@Debian:/tmp# gcc -c -O3 nf.c
nf.c: In function `init_module':
nf.c:23: invalid use of undefined type `struct
nf_hook_ops'
nf.c:24: invalid use of undefined type `struct
nf_hook_ops'
nf.c:25: invalid use of undefined type `struct
nf_hook_ops'
nf.c:26: invalid use of undefined type `struct
nf_hook_ops'
nf.c: At top level:
nf.c:9: storage size of `nfho' isn't known

We are testing it in a:

Linux Distibution:  Debian GNU/Linux 3.0
Kernel:             Linux Debian 2.4.18-k6 #1 Sun Apr
14 12:43:22 EST 2002 i586 unknown
Glibc:              2.2.5-11.5


This machine is up to date with mirrors, and we have
installed necessary packages over Debian (we belive):

root@Debian:/tmp#
root@Debian:/tmp# dpkg --get-selections |grep kernel
kernel-headers-2.4.18-k6                       
install
kernel-image-2.4.18-k6                         
install
kernel-package                                 
install
kernel-source-2.4.18                           
install

root@Debian:/tmp# dpkg --get-selections |grep iptables
iptables                                       
install

Well, in Red Hat 8 and 8, Slackware 9, 9.1 and 10 it
compile and work fine. What is the porblem with Debian
?

Regards.

Danett


	
	
		
_______________________________________________________
Yahoo! Mail agora com 100MB, anti-spam e antivírus grátis!
http://br.info.mail.yahoo.com/




Reply to: