diff options
author | Patrick McHardy <kaber@trash.net> | 2011-04-12 16:05:39 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-04-12 16:05:39 +0200 |
commit | cd50f26ad6016ae57af1f822f8aa3ceb2ef9727a (patch) | |
tree | ecd79b89cc099c7ca1726df0417328cc822a9e69 /xtables.c | |
parent | 884d2675f1a880ffcc072da69ab8c9aaea2a3bce (diff) | |
parent | b18ffe3636b07cd817628de81643136e4755a944 (diff) |
Merge branch 'opts' of git://dev.medozas.de/iptables
Diffstat (limited to 'xtables.c')
-rw-r--r-- | xtables.c | 25 |
1 files changed, 6 insertions, 19 deletions
@@ -49,6 +49,7 @@ # define IP6T_SO_GET_REVISION_TARGET 69 #endif #include <getopt.h> +#include "iptables/internal.h" #include "xshared.h" #define NPROTO 255 @@ -136,24 +137,6 @@ struct option *xtables_merge_options(struct option *orig_opts, return merge; } -/** - * xtables_afinfo - protocol family dependent information - * @kmod: kernel module basename (e.g. "ip_tables") - * @libprefix: prefix of .so library name (e.g. "libipt_") - * @family: nfproto family - * @ipproto: used by setsockopt (e.g. IPPROTO_IP) - * @so_rev_match: optname to check revision support of match - * @so_rev_target: optname to check revision support of target - */ -struct xtables_afinfo { - const char *kmod; - const char *libprefix; - uint8_t family; - uint8_t ipproto; - int so_rev_match; - int so_rev_target; -}; - static const struct xtables_afinfo afinfo_ipv4 = { .kmod = "ip_tables", .libprefix = "libipt_", @@ -172,7 +155,7 @@ static const struct xtables_afinfo afinfo_ipv6 = { .so_rev_target = IP6T_SO_GET_REVISION_TARGET, }; -static const struct xtables_afinfo *afinfo; +const struct xtables_afinfo *afinfo; /* Search path for Xtables .so files */ static const char *xtables_libdir; @@ -823,6 +806,8 @@ void xtables_register_match(struct xtables_match *me) exit(1); } + if (me->x6_options != NULL) + xtables_option_metavalidate(me->name, me->x6_options); if (me->extra_opts != NULL) xtables_check_options(me->name, me->extra_opts); @@ -918,6 +903,8 @@ void xtables_register_target(struct xtables_target *me) exit(1); } + if (me->x6_options != NULL) + xtables_option_metavalidate(me->name, me->x6_options); if (me->extra_opts != NULL) xtables_check_options(me->name, me->extra_opts); |