From 5bc09b8e9db045c7136d76405c1733ea531be0f7 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Mon, 14 Apr 2008 06:56:58 +0000 Subject: [PATCH 8/8] Implement AF_UNSPEC as a wildcard for extensions --- extensions/libxt_rateest.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'extensions/libxt_rateest.c') diff --git a/extensions/libxt_rateest.c b/extensions/libxt_rateest.c index 5f13340..a335781 100644 --- a/extensions/libxt_rateest.c +++ b/extensions/libxt_rateest.c @@ -426,22 +426,8 @@ rateest_save(const void *ip, const struct xt_entry_match *match) } } -static struct xtables_match rateest_match4 = { - .family = AF_INET, - .name = "rateest", - .version = IPTABLES_VERSION, - .size = XT_ALIGN(sizeof(struct xt_rateest_match_info)), - .userspacesize = XT_ALIGN(offsetof(struct xt_rateest_match_info, est1)), - .help = rateest_help, - .parse = rateest_parse, - .final_check = rateest_final_check, - .print = rateest_print, - .save = rateest_save, - .extra_opts = rateest_opts, -}; - -static struct xtables_match rateest_match6 = { - .family = AF_INET6, +static struct xtables_match rateest_mt_reg = { + .family = AF_UNSPEC, .name = "rateest", .version = IPTABLES_VERSION, .size = XT_ALIGN(sizeof(struct xt_rateest_match_info)), @@ -456,6 +442,5 @@ static struct xtables_match rateest_match6 = { void _init(void) { - xtables_register_match(&rateest_match4); - xtables_register_match(&rateest_match6); + xtables_register_match(&rateest_mt_reg); } -- cgit v1.2.3