extensions: collapse registration structures
There are no different code paths between IPV4 and IPV6, so
data can be consolidated here.
text data bss dec hex filename
243757 12212 2576 258545 3f1f1 ip6tables-static[before.i586]
243613 9428 2576 255617 3e681 ip6tables-static[after.i586]
-144 -2784
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
diff --git a/extensions/libxt_NFQUEUE.c b/extensions/libxt_NFQUEUE.c
index 3ca2239..53ecf1c 100644
--- a/extensions/libxt_NFQUEUE.c
+++ b/extensions/libxt_NFQUEUE.c
@@ -78,7 +78,7 @@
}
static struct xtables_target nfqueue_target = {
- .family = NFPROTO_IPV4,
+ .family = NFPROTO_UNSPEC,
.name = "NFQUEUE",
.version = XTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_NFQ_info)),
@@ -90,21 +90,7 @@
.extra_opts = NFQUEUE_opts
};
-static struct xtables_target nfqueue_target6 = {
- .family = NFPROTO_IPV6,
- .name = "NFQUEUE",
- .version = XTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_NFQ_info)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_NFQ_info)),
- .help = NFQUEUE_help,
- .parse = NFQUEUE_parse,
- .print = NFQUEUE_print,
- .save = NFQUEUE_save,
- .extra_opts = NFQUEUE_opts,
-};
-
void _init(void)
{
xtables_register_target(&nfqueue_target);
- xtables_register_target(&nfqueue_target6);
}