--------------29B58F6294ACD6E702A56C86
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
first, excuse my english, because I usually do not speak English...
I have seen the same things when I compile netfilter-0.90.4 with kernel
2.3.51...
The problem comes owing to the fact that the file netfilter.h changed
compared the the old version of the kernel. I explain you below a hack
which permit you to compile netfilter-0.90.4 with kernel 2.3.51...I have
not made a patch, because I do not known if the modification is normal for
this version of netfilter...is this file corrupted or is
compat/ip_fw_compat corrupted???? Mister Paul Rusty can answer to this
question...
to compile netfilter, you must add some lines in the file netfilter.h....
-> Add the following line in the end of the enumeration nf_reason...
NF_REASON_MIN_RESERVED_FOR_CONNTRACK = 1024
-> Add two structures struct nf_wakeme and struct nf_interest after the
struct nf_info
struct nf_wakeme
{
wait_queue_head_t sleep;
struct sk_buff_head skbq;
};
struct nf_interest
{
struct list_head list;
int pf;
unsigned int bookmask;
unsigned int mark;
unsigned int reason;
struct nf_wakeme *wake;
};
you can found these structures and enumeration in the netfilter.h files
of the kernel 2.3.24 for example...
-> and if you have an error like this "INT_MAX undeclared" in the file
tools/ip_gen.c
add after all include -> #include <limits.h>
...with these modifications, netfilter must compile correctly
I have not yet tested if netfilter work correctly with these
modifications...
Any comments about this hack???
enjoy, Christophe
KevinWaterson wrote:
> Will not compile :(
>
> looks like this.......
>
> [root@kevin netfilter-0.90.4]# make install
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/ip_nat_standalone.c -c -o
> NAT/ip_nat_standalone.o
> NAT/ip_nat_standalone.c:225: warning: initialization makes integer from
> pointer without a cast
> NAT/ip_nat_standalone.c:225: warning: excess elements in struct
> initializer after `ip_nat_in_ops'
> NAT/ip_nat_standalone.c:228: warning: initialization makes integer from
> pointer without a cast
> NAT/ip_nat_standalone.c:228: warning: excess elements in struct
> initializer after `ip_nat_out_ops'
> NAT/ip_nat_standalone.c:231: warning: initialization makes integer from
> pointer without a cast
> NAT/ip_nat_standalone.c:231: warning: excess elements in struct
> initializer after `ip_nat_local_out_ops'
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/ip_nat_core.c -c -o NAT/ip_nat_core.o
>
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/ip_nat_rule.c -c -o NAT/ip_nat_rule.o
>
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/extensions/ip_nat_ftp.c -c -o
> NAT/extensions/ip_nat_ftp.o
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/mapping-types/ipt_MASQUERADE.c -c -o
> NAT/mapping-types/ipt_MASQUERADE
> o
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/mapping-types/ipt_REDIRECT.c -c -o
> NAT/mapping-types/ipt_REDIRECT.o
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/protocols/ip_nat_tcp.c -c -o
> NAT/protocols/ip_nat_tcp.o
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/protocols/ip_nat_unknown.c -c -o
> NAT/protocols/ip_nat_unknown.o
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/protocols/ip_nat_icmp.c -c -o
> NAT/protocols/ip_nat_icmp.o
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing NAT/protocols/ip_nat_udp.c -c -o
> NAT/protocols/ip_nat_udp.o
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
> MODULE -fno-strict-aliasing compat/ip_fw_compat.c -c -o
> compat/ip_fw_compat.o
> compat/ip_fw_compat.c: In function `fw_in':
> compat/ip_fw_compat.c:105: `NF_REASON_MIN_RESERVED_FOR_CONNTRACK'
> undeclared (first use in this function
> )
> compat/ip_fw_compat.c:105: (Each undeclared identifier is reported only
> once
> compat/ip_fw_compat.c:105: for each function it appears in.)
> compat/ip_fw_compat.c: At top level:
> compat/ip_fw_compat.c:177: warning: initialization makes integer from
> pointer without a cast
> compat/ip_fw_compat.c:177: warning: excess elements in struct
> initializer after `preroute_ops'
> compat/ip_fw_compat.c:180: warning: initialization makes integer from
> pointer without a cast
> compat/ip_fw_compat.c:180: warning: excess elements in struct
> initializer after `postroute_ops'
> compat/ip_fw_compat.c:183: warning: initialization makes integer from
> pointer without a cast
> compat/ip_fw_compat.c:183: warning: excess elements in struct
> initializer after `forward_ops'
> make: *** [compat/ip_fw_compat.o] Error 1
> [root@kevin netfilter-0.90.4]# make install
> cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
> -DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -DMODULE
> -fno-strict-aliasing compat/ip_fw_compat.c -c -o compat/ip_fw_compat.o
> compat/ip_fw_compat.c: In function `fw_in':
> compat/ip_fw_compat.c:105: `NF_REASON_MIN_RESERVED_FOR_CONNTRACK'
> undeclared (first use in this function)
> compat/ip_fw_compat.c:105: (Each undeclared identifier is reported only
> once
> compat/ip_fw_compat.c:105: for each function it appears in.)
> compat/ip_fw_compat.c: At top level:
> compat/ip_fw_compat.c:177: warning: initialization makes integer from
> pointer without a cast
> compat/ip_fw_compat.c:177: warning: excess elements in struct
> initializer after `preroute_ops'
> compat/ip_fw_compat.c:180: warning: initialization makes integer from
> pointer without a cast
> compat/ip_fw_compat.c:180: warning: excess elements in struct
> initializer after `postroute_ops'
> compat/ip_fw_compat.c:183: warning: initialization makes integer from
> pointer without a cast
> compat/ip_fw_compat.c:183: warning: excess elements in struct
> initializer after `forward_ops'
> make: *** [compat/ip_fw_compat.o] Error 1
--
Christophe Burki
Software Engineer
Lightning Instrumentation SA
mail: christophe.burki@lightning.ch
web : http://www.lightning.ch
--------------29B58F6294ACD6E702A56C86
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
Hi,
first, excuse my english, because I usually do not speak English...
I have seen the same things when I compile netfilter-0.90.4 with kernel
2.3.51...
The problem comes owing to the fact that the file netfilter.h changed
compared the the old version of the kernel. I explain you below a hack
which permit you to compile netfilter-0.90.4 with kernel 2.3.51...I have
not made a patch, because I do not known if the modification is normal
for this version of netfilter...is this file corrupted or is compat/ip_fw_compat
corrupted???? Mister Paul Rusty can answer to this question...
to compile netfilter, you must add some lines in the file netfilter.h....
-> Add the following line in the end of the enumeration nf_reason...
NF_REASON_MIN_RESERVED_FOR_CONNTRACK
= 1024
-> Add two structures struct nf_wakeme and struct nf_interest
after the struct nf_info
struct nf_wakeme
{
wait_queue_head_t sleep;
struct sk_buff_head skbq;
};
struct nf_interest
{
struct list_head list;
int pf;
unsigned int bookmask;
unsigned int mark;
unsigned int reason;
struct nf_wakeme *wake;
};
you can found these structures and enumeration in the netfilter.h
files of the kernel 2.3.24 for example...
-> and if you have an error like this "INT_MAX undeclared" in
the file tools/ip_gen.c
add after all include ->
#include <limits.h>
...with these modifications, netfilter must compile correctly
I have not yet tested if netfilter work correctly with these modifications...
Any comments about this hack???
enjoy, Christophe
KevinWaterson wrote:
Will not compile :(
looks like this.......
[root@kevin netfilter-0.90.4]# make install
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/ip_nat_standalone.c
-c -o
NAT/ip_nat_standalone.o
NAT/ip_nat_standalone.c:225: warning: initialization makes integer
from
pointer without a cast
NAT/ip_nat_standalone.c:225: warning: excess elements in struct
initializer after `ip_nat_in_ops'
NAT/ip_nat_standalone.c:228: warning: initialization makes integer
from
pointer without a cast
NAT/ip_nat_standalone.c:228: warning: excess elements in struct
initializer after `ip_nat_out_ops'
NAT/ip_nat_standalone.c:231: warning: initialization makes integer
from
pointer without a cast
NAT/ip_nat_standalone.c:231: warning: excess elements in struct
initializer after `ip_nat_local_out_ops'
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/ip_nat_core.c -c
-o NAT/ip_nat_core.o
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/ip_nat_rule.c -c
-o NAT/ip_nat_rule.o
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/extensions/ip_nat_ftp.c
-c -o
NAT/extensions/ip_nat_ftp.o
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/mapping-types/ipt_MASQUERADE.c
-c -o
NAT/mapping-types/ipt_MASQUERADE
o
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/mapping-types/ipt_REDIRECT.c
-c -o
NAT/mapping-types/ipt_REDIRECT.o
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/protocols/ip_nat_tcp.c
-c -o
NAT/protocols/ip_nat_tcp.o
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/protocols/ip_nat_unknown.c
-c -o
NAT/protocols/ip_nat_unknown.o
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/protocols/ip_nat_icmp.c
-c -o
NAT/protocols/ip_nat_icmp.o
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing NAT/protocols/ip_nat_udp.c
-c -o
NAT/protocols/ip_nat_udp.o
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -D
MODULE -fno-strict-aliasing compat/ip_fw_compat.c
-c -o
compat/ip_fw_compat.o
compat/ip_fw_compat.c: In function `fw_in':
compat/ip_fw_compat.c:105: `NF_REASON_MIN_RESERVED_FOR_CONNTRACK'
undeclared (first use in this function
)
compat/ip_fw_compat.c:105: (Each undeclared identifier is reported
only
once
compat/ip_fw_compat.c:105: for each function it appears in.)
compat/ip_fw_compat.c: At top level:
compat/ip_fw_compat.c:177: warning: initialization makes integer from
pointer without a cast
compat/ip_fw_compat.c:177: warning: excess elements in struct
initializer after `preroute_ops'
compat/ip_fw_compat.c:180: warning: initialization makes integer from
pointer without a cast
compat/ip_fw_compat.c:180: warning: excess elements in struct
initializer after `postroute_ops'
compat/ip_fw_compat.c:183: warning: initialization makes integer from
pointer without a cast
compat/ip_fw_compat.c:183: warning: excess elements in struct
initializer after `forward_ops'
make: *** [compat/ip_fw_compat.o] Error 1
[root@kevin netfilter-0.90.4]# make install
cc -O -Wall -Wunused -Iinclude/ -I/usr/src/linux/include
-DNETFILTER_VERSION=\"0.90.4\" -D__KERNEL__ -DMODULE
-fno-strict-aliasing compat/ip_fw_compat.c -c -o compat/ip_fw_compat.o
compat/ip_fw_compat.c: In function `fw_in':
compat/ip_fw_compat.c:105: `NF_REASON_MIN_RESERVED_FOR_CONNTRACK'
undeclared (first use in this function)
compat/ip_fw_compat.c:105: (Each undeclared identifier is reported
only
once
compat/ip_fw_compat.c:105: for each function it appears in.)
compat/ip_fw_compat.c: At top level:
compat/ip_fw_compat.c:177: warning: initialization makes integer from
pointer without a cast
compat/ip_fw_compat.c:177: warning: excess elements in struct
initializer after `preroute_ops'
compat/ip_fw_compat.c:180: warning: initialization makes integer from
pointer without a cast
compat/ip_fw_compat.c:180: warning: excess elements in struct
initializer after `postroute_ops'
compat/ip_fw_compat.c:183: warning: initialization makes integer from
pointer without a cast
compat/ip_fw_compat.c:183: warning: excess elements in struct
initializer after `forward_ops'
make: *** [compat/ip_fw_compat.o] Error 1
--
Christophe Burki
Software Engineer
Lightning Instrumentation SA
mail: christophe.burki@lightning.ch
web : http://www.lightning.ch