diff options
author | Arturo Borrero <arturo.borrero.glez@gmail.com> | 2015-02-13 11:38:02 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-02-18 23:43:07 +0100 |
commit | 34c36aeebd0b44629ef6c54a3087b3b531ccc1a5 (patch) | |
tree | 02bddf39a0090c482841ed544d5b6e1d6a9396e7 /iptables/xtables-arp.c | |
parent | 6dc53c514f1e4683e51a877b3a2f3128cfccef28 (diff) |
arptables-compat: add mangle target extension
This patch adds support to use the mangle target extensions, along with
the required changes in the surrounding code.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/xtables-arp.c')
-rw-r--r-- | iptables/xtables-arp.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c index c92b9e75..26ece01d 100644 --- a/iptables/xtables-arp.c +++ b/iptables/xtables-arp.c @@ -44,6 +44,7 @@ #include <sys/wait.h> #include <net/if.h> #include <netinet/ether.h> +#include <iptables.h> #include <xtables.h> #include "xshared.h" @@ -151,8 +152,14 @@ int RUNTIME_NF_ARP_NUMHOOKS = 3; static struct option *opts = original_opts; static unsigned int global_option_offset = 0; -extern void xtables_exit_error(enum xtables_exittype status, const char *msg, ...); -extern struct xtables_globals xtables_globals; +extern void xtables_exit_error(enum xtables_exittype status, const char *msg, ...) __attribute__((noreturn, format(printf,2,3))); +struct xtables_globals arptables_globals = { + .option_offset = 0, + .program_version = IPTABLES_VERSION, + .orig_opts = original_opts, + .exit_err = xtables_exit_error, + .compat_rev = nft_compatible_revision, +}; /* Table of legal combinations of commands and options. If any of the * given commands make an option legal, that option is legal (applies to @@ -833,11 +840,11 @@ static struct xtables_target *command_jump(struct arpt_entry *fw, xs_init_target(target); if (target->x6_options != NULL) - opts = xtables_options_xfrm(xtables_globals.orig_opts, + opts = xtables_options_xfrm(arptables_globals.orig_opts, opts, target->x6_options, &target->option_offset); else - opts = xtables_merge_options(xtables_globals.orig_opts, + opts = xtables_merge_options(arptables_globals.orig_opts, opts, target->extra_opts, &target->option_offset); |