summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_CONNMARK.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-06-12 20:55:44 +0200
committerJan Engelhardt <jengelh@medozas.de>2009-06-26 21:13:09 +0200
commitc5e85736c207f211d82d2878a5781f512327dfce (patch)
tree38e324d6ae9697bf3bba4c9110308a2e9e42b0bf /extensions/libxt_CONNMARK.c
parentcc4344042e8c0bb6eef877975588321aa152660d (diff)
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>
Diffstat (limited to 'extensions/libxt_CONNMARK.c')
-rw-r--r--extensions/libxt_CONNMARK.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/extensions/libxt_CONNMARK.c b/extensions/libxt_CONNMARK.c
index 6e42898f..5e9c3748 100644
--- a/extensions/libxt_CONNMARK.c
+++ b/extensions/libxt_CONNMARK.c
@@ -399,23 +399,7 @@ connmark_tg_save(const void *ip, const struct xt_entry_target *target)
}
static struct xtables_target connmark_target = {
- .family = NFPROTO_IPV4,
- .name = "CONNMARK",
- .revision = 0,
- .version = XTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_connmark_target_info)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_connmark_target_info)),
- .help = CONNMARK_help,
- .init = CONNMARK_init,
- .parse = CONNMARK_parse,
- .final_check = connmark_tg_check,
- .print = CONNMARK_print,
- .save = CONNMARK_save,
- .extra_opts = CONNMARK_opts,
-};
-
-static struct xtables_target connmark_target6 = {
- .family = NFPROTO_IPV6,
+ .family = NFPROTO_UNSPEC,
.name = "CONNMARK",
.revision = 0,
.version = XTABLES_VERSION,
@@ -434,23 +418,7 @@ static struct xtables_target connmark_tg_reg = {
.version = XTABLES_VERSION,
.name = "CONNMARK",
.revision = 1,
- .family = NFPROTO_IPV4,
- .size = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
- .help = connmark_tg_help,
- .init = connmark_tg_init,
- .parse = connmark_tg_parse,
- .final_check = connmark_tg_check,
- .print = connmark_tg_print,
- .save = connmark_tg_save,
- .extra_opts = connmark_tg_opts,
-};
-
-static struct xtables_target connmark_tg6_reg = {
- .version = XTABLES_VERSION,
- .name = "CONNMARK",
- .revision = 1,
- .family = NFPROTO_IPV6,
+ .family = NFPROTO_UNSPEC,
.size = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
.userspacesize = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
.help = connmark_tg_help,
@@ -465,7 +433,5 @@ static struct xtables_target connmark_tg6_reg = {
void _init(void)
{
xtables_register_target(&connmark_target);
- xtables_register_target(&connmark_target6);
xtables_register_target(&connmark_tg_reg);
- xtables_register_target(&connmark_tg6_reg);
}