iptables 1.3.6 compilation issues in libipt_iprange.c (non-existant __be32 type)
Hi,
iptables 1.3.6 does not compile with the 2.6.19 kernel because an undefined type __be32 is used in libipt_iprange.c
Apparently, a fix was issued before, which can be found here:
http://lists.netfilter.org/pipermail/netfilter/2006-October/066954.html
Before I started looking for a patch, I wrote one myself and it's a bit different from the one found at the location mentioned above.
Instead of #defining the __be32 type "manually", you could also #include <linux/types.h>, which defines that datatype.
I'm not sure if it's a good idea to duplicate definitions of datatypes in iptables. Is there a purpose I'm overlooking ?
Is it also possible to mention the fix for the __be32 issue on netfilter.org ? I'm sure more people will run into it as 2.6.19 is going mainstream, and we don't all use the SVN repository to compile iptables :)
kind regards,
-- Steven
PS: my one-line patch is attached for reference
Signature · 2 lines
My amazon wishlist: http://www.amazon.com/gp/registry/1DB4XNEIEQBPB
extensions/libipt_iprange.c +1 -0
@@ -6,6 +6,7 @@#include <getopt.h> #include <iptables.h> +#include <linux/types.h> #include <linux/netfilter_ipv4/ipt_iprange.h> /* Function which prints out usage message. */
Quoted 15 lines · Steven Van Acker
Hi,
iptables 1.3.6 does not compile with the 2.6.19 kernel because an undefined type
__be32is used inlibipt_iprange.cApparently, a fix was issued before, which can be found here:
http://lists.netfilter.org/pipermail/netfilter/2006-October/066954.htmlBefore I started looking for a patch, I wrote one myself and it's a bit different from the one found at the location mentioned above.
Instead of #defining the
__be32type "manually", you could also #include <linux/types.h>, which defines that datatype.
Quoted 7 lines
I'm not sure if it's a good idea to duplicate definitions of datatypes in iptables. Is there a purpose I'm overlooking ?
Is it also possible to mention the fix for the
__be32issue on netfilter.org ? I'm sure more people will run into it as 2.6.19 is going mainstream, and we don't all use the SVN repository to compile iptables :)
I've already uploaded a 1.3.7 release to ftp.netfilter.org to fix this issue (please test :), once the webpage has been updated I'll send out the announcement.
Quoted 3 lines · Patrick McHardy
I've already uploaded a 1.3.7 release to ftp.netfilter.org to fix this issue (please test :), once the webpage has been updated I'll send out the announcement.
1.3.7 compiles and works nicely with a 2.6.19 kernel on my system. Thanks :)
I'm still wondering why <linux/types.h> is not used though. Is it to avoid complications with older kernels ?
kinds regards,
-- Steven
Signature · 2 lines
My amazon wishlist: http://www.amazon.com/gp/registry/1DB4XNEIEQBPB
Quoted 5 lines · Steven Van Acker
1.3.7 compiles and works nicely with a 2.6.19 kernel on my system. Thanks :)
I'm still wondering why <
linux/types.h> is not used though. Is it to avoid complications with older kernels ?
Main reason is because I didn't think of it :) But I don't see an advantage in changing it again.