Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#74 iptables-1.4.3 not compile

open
nobody
iptables (3)
9
2015-03-23
2010-05-31
akong
No

I use netfilter-layer7-v2.22 and use kernel-2.6.25-2.6.28-layer7-2.22.patch to patch kernel.
When I compile iptables-1.4.3.2
./configure
make KERNEL_DIR=/usr/src/linux-2.6.30.5-1
................
CC libxt_layer7.oo
libxt_layer7.c:25:39: warning: linux/netfilter/xt_layer7.h: No such file or directory
libxt_layer7.c:48: warning: 'struct xt_layer7_info' declared inside parameter list
libxt_layer7.c:48: warning: its scope is only this definition or declaration, which is probably not what you want
libxt_layer7.c: In function 'parse_protocol_file':
libxt_layer7.c:92: error: 'MAX_PROTOCOL_LEN' undeclared (first use in this function)
libxt_layer7.c:92: error: (Each undeclared identifier is reported only once
libxt_layer7.c:92: error: for each function it appears in.)
libxt_layer7.c:95: error: dereferencing pointer to incomplete type
libxt_layer7.c:101: error: 'MAX_PATTERN_LEN' undeclared (first use in this function)
libxt_layer7.c:103: error: dereferencing pointer to incomplete type
libxt_layer7.c: At top level:
libxt_layer7.c:249: warning: 'struct xt_layer7_info' declared inside parameter list
libxt_layer7.c: In function 'parse_layer7_protocol':
libxt_layer7.c:270: warning: passing argument 3 of 'parse_protocol_file' from incompatible pointer type
libxt_layer7.c:48: note: expected 'struct xt_layer7_info *' but argument is of type 'struct xt_layer7_info *'
libxt_layer7.c:284: error: dereferencing pointer to incomplete type
libxt_layer7.c:284: error: dereferencing pointer to incomplete type
libxt_layer7.c:284: error: 'MAX_PATTERN_LEN' undeclared (first use in this function)
libxt_layer7.c: In function 'parse':
libxt_layer7.c:296: warning: passing argument 2 of 'parse_layer7_protocol' from incompatible pointer type
libxt_layer7.c:249: note: expected 'struct xt_layer7_info *' but argument is of type 'struct xt_layer7_info *'
libxt_layer7.c:298: error: dereferencing pointer to incomplete type
libxt_layer7.c: In function 'print':
libxt_layer7.c:339: error: dereferencing pointer to incomplete type
libxt_layer7.c:340: error: dereferencing pointer to incomplete type
libxt_layer7.c: In function 'save':
libxt_layer7.c:348: error: dereferencing pointer to incomplete type
libxt_layer7.c:348: error: dereferencing pointer to incomplete type
libxt_layer7.c: At top level:
libxt_layer7.c:355: error: invalid application of 'sizeof' to incomplete type 'struct xt_layer7_info'
libxt_layer7.c:356: error: invalid application of 'sizeof' to incomplete type 'struct xt_layer7_info'
make[2]: *** [libxt_layer7.oo] Error 1
make[2]: Leaving directory `/usr/local/src/iptables-1.4.3.2/extensions'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/iptables-1.4.3.2'
make: *** [all] Error 2

I get this problem.
How to fix it?

Discussion

  • akong
    akong
    2010-05-31

    • priority: 5 --> 9
     
  • akong
    akong
    2010-05-31

    I have put libxt_layer7.c and libxt_layer7.man to iptables source.
    then to compile it.