From 7dd8b1a678f54af97c4562387ce2f223ea34d5c8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 2 Apr 2008 05:41:05 +0200 Subject: [PATCH] condition: reenable IPv6 support in userspace extension --- extensions/libxt_condition.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/extensions/libxt_condition.c b/extensions/libxt_condition.c index 714c256..e4fb9c8 100644 --- a/extensions/libxt_condition.c +++ b/extensions/libxt_condition.c @@ -68,8 +68,25 @@ static void condition_save(const void *ip, const struct xt_entry_match *match) printf("--condition %s\"%s\" ", (info->invert) ? "! " : "", info->name); } -static struct xtables_match condition_match = { +static struct xtables_match condition_mt4_reg = { .name = "condition", + .revision = 0, + .family = PF_INET, + .version = XTABLES_VERSION, + .size = XT_ALIGN(sizeof(struct xt_condition_mtinfo)), + .userspacesize = XT_ALIGN(sizeof(struct xt_condition_mtinfo)), + .help = condition_help, + .parse = condition_parse, + .final_check = condition_check, + .print = condition_print, + .save = condition_save, + .extra_opts = condition_opts, +}; + +static struct xtables_match condition_mt6_reg = { + .name = "condition", + .revision = 0, + .family = PF_INET6, .version = XTABLES_VERSION, .size = XT_ALIGN(sizeof(struct xt_condition_mtinfo)), .userspacesize = XT_ALIGN(sizeof(struct xt_condition_mtinfo)), @@ -83,5 +100,6 @@ static struct xtables_match condition_match = { static void _init(void) { - xtables_register_match(&condition_match); + xtables_register_match(&condition_mt4_reg); + xtables_register_match(&condition_mt6_reg); }