.compat_rev = nft_compatible_revision,
};
-#define opts ebtables_globals.opts
#define prog_name ebtables_globals.program_name
#define prog_vers ebtables_globals.program_version
/* This code is very similar to iptables/xtables.c:command_match() */
static void ebt_load_match(const char *name)
{
+ struct option *opts = xt_params->opts;
struct xtables_match *m;
size_t size;
m->extra_opts, &m->option_offset);
if (opts == NULL)
xtables_error(OTHER_PROBLEM, "Can't alloc memory");
+ xt_params->opts = opts;
}
static void ebt_load_watcher(const char *name)
{
+ struct option *opts = xt_params->opts;
struct xtables_target *watcher;
size_t size;
&watcher->option_offset);
if (opts == NULL)
xtables_error(OTHER_PROBLEM, "Can't alloc memory");
+ xt_params->opts = opts;
}
static void ebt_load_match_extensions(void)
{
- opts = ebt_original_options;
+ xt_params->opts = ebt_original_options;
ebt_load_match("802_3");
ebt_load_match("arp");
ebt_load_match("ip");
/* assign them back so do_parse() may
* reset opts to orig_opts upon each call */
- xt_params->orig_opts = opts;
+ xt_params->orig_opts = xt_params->opts;
}
void ebt_add_match(struct xtables_match *m,
void nft_fini_eb(struct nft_handle *h)
{
+ struct option *opts = xt_params->opts;
struct xtables_match *match;
struct xtables_target *target;