Skip to contentSkip to conversation

libipt_REJECT does not compile with current svn

DISCUSSION Maciej Soltysiak 2 participants 2 messages Apr 11, 2005 – Apr 12, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

Trying to compile current svn with 2.6.12-rc2 give me this:

Extensions found: IPv4:CLUSTERIP IPv4:recent IPv6:ah IPv6:esp IPv6:frag IPv6:ipv6header IPv6:hbh IPv6:dst IPv6:rt
cc -O2 -Wall -Wunused -I/usr/src/linux/include -Iinclude/ -DIPTABLES_VERSION=\"1.3.1\" -fPIC -o extensions/libipt_REJECT_sh.o -c extensions/libipt_REJECT.c extensions/libipt_REJECT.c:50: error: `IPT_ICMP_FRAG_NEEDED' undeclared here (not in a function)
extensions/libipt_REJECT.c:50: error: initializer element is not constant
extensions/libipt_REJECT.c:50: error: (near initialization for `reject_table[7].with')
extensions/libipt_REJECT.c:50: error: initializer element is not constant
extensions/libipt_REJECT.c:50: error: (near initialization for `reject_table[7]')
extensions/libipt_REJECT.c:52: error: initializer element is not constant
extensions/libipt_REJECT.c:52: error: (near initialization for `reject_table[8]')
extensions/libipt_REJECT.c: In function `init_v1':
extensions/libipt_REJECT.c:110: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c: In function `parse_v1':
extensions/libipt_REJECT.c:169: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c:180: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c:180: error: `IPT_ICMP_FRAG_NEEDED' undeclared (first use in this function) extensions/libipt_REJECT.c:180: error: (Each undeclared identifier is reported only once
extensions/libipt_REJECT.c:180: error: for each function it appears in.)
extensions/libipt_REJECT.c:185: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c: In function `print_v1':
extensions/libipt_REJECT.c:228: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c:233: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c:233: error: `IPT_ICMP_FRAG_NEEDED' undeclared (first use in this function) extensions/libipt_REJECT.c:234: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c: In function `save_v1':
extensions/libipt_REJECT.c:260: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c:265: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c:265: error: `IPT_ICMP_FRAG_NEEDED' undeclared (first use in this function) extensions/libipt_REJECT.c:266: error: dereferencing pointer to incomplete type
extensions/libipt_REJECT.c: At top level:
extensions/libipt_REJECT.c:290: error: invalid application of `sizeof' to an incomplete type
extensions/libipt_REJECT.c:291: error: invalid application of `sizeof' to an incomplete type

--
Regards,
Maciej

#1 lore raw
Quoted 8 lines · Maciej Soltysiak

Hi,

Trying to compile current svn with 2.6.12-rc2 give me this:

Extensions found: IPv4:CLUSTERIP IPv4:recent IPv6:ah IPv6:esp IPv6:frag IPv6:ipv6header IPv6:hbh IPv6:dst IPv6:rt
cc -O2 -Wall -Wunused -I/usr/src/linux/include -Iinclude/ -DIPTABLES_VERSION=\"1.3.1\" -fPIC -o extensions/libipt_REJECT_sh.o -c extensions/libipt_REJECT.c extensions/libipt_REJECT.c:50: error: `IPT_ICMP_FRAG_NEEDED' undeclared here (not in a function)
extensions/libipt_REJECT.c:50: error: initializer element is not constant

You are missing the kernel patch - This is the hunk you are missing - There is more - See my other posting a couple days ago.

Probably the _v1 stuff should be folded into ifdefs ?!?

include/linux/netfilter_ipv4/ipt_REJECT.h +7 -1
diff -Nur linux-2.6.11.6.vanilla/include/linux/netfilter_ipv4/ipt_REJECT.h linux-2.6.11.6/include/linux/netfilter_ipv4/ipt_REJECT.h
@@ -10,11 +10,17 @@
 	IPT_ICMP_NET_PROHIBITED,
 	IPT_ICMP_HOST_PROHIBITED,
 	IPT_TCP_RESET,
-	IPT_ICMP_ADMIN_PROHIBITED
+	IPT_ICMP_ADMIN_PROHIBITED,
+	IPT_ICMP_FRAG_NEEDED
 };
 
 struct ipt_reject_info {
 	enum ipt_reject_with with;      /* reject type */
 };
 
+struct ipt_reject_info_v1 {
+	enum ipt_reject_with with;      /* reject type */
+	u_int16_t value;
+};
+
 #endif /*_IPT_REJECT_H*/
Signature · 2 lines
Florian Lohoff                  [email protected]             +49-171-2280134
                        Heisenberg may have been here.