diff options
author | Andreas Henriksson <andreas@fatal.se> | 2009-12-02 16:11:50 +0100 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-12-26 10:09:27 -0800 |
commit | a36ceb85d7ae6a9742c35417e80ae837ce9f146d (patch) | |
tree | 34aa21c4f95be390334a569832923be1fd420538 /configure | |
parent | 80d689d055b2169b390a7cd4ca2c01ba871d02a2 (diff) |
Add new (iptables 1.4.5 compatible) tc/ipt/xt module.
Add a new cleaned up m_xt.c based on m_xt_old.c
The new m_xt.c has been updated to use the new names and new api
that xtables exposes in iptables 1.4.5.
All the old internal api cruft has also been dropped.
Additionally, a configure script test is added to check for
the new xtables api and set the TC_CONFIG_XT flag in Config.
(tc/Makefile already handles this flag in previous commit.)
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -28,6 +28,33 @@ rm -f /tmp/atmtest.c /tmp/atmtest echo -n " IPT " +#check if we have xtables from iptables >= 1.4.5. +cat >/tmp/ipttest.c <<EOF +#include <xtables.h> +#include <linux/netfilter.h> +static struct xtables_globals test_globals = { + .option_offset = 0, + .program_name = "tc-ipt", + .program_version = XTABLES_VERSION, + .orig_opts = NULL, + .opts = NULL, + .exit_err = NULL, +}; + +int main(int argc, char **argv) +{ + xtables_init_all(&test_globals, NFPROTO_IPV4); + return 0; +} + +EOF + +if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1 +then + echo "TC_CONFIG_XT:=y" >>Config + echo "using xtables instead of iptables" +fi + #check if we need dont our internal header .. cat >/tmp/ipttest.c <<EOF #include <xtables.h> |