summaryrefslogtreecommitdiffstats
path: root/iptables/iptables.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-06-18 21:18:29 +0200
committerJan Engelhardt <jengelh@medozas.de>2011-06-21 17:05:11 +0200
commit14190986f87301b18bcc473c842bd82d778d87a2 (patch)
tree6f3aa579a7e75023d929bc04b482cac98ce20262 /iptables/iptables.c
parent68818f746bf9c68de04a75fbe756bf2c73e0fb32 (diff)
iptables: consolidate target/match init call
This is useful for the upcoming patch about per-instance auxiliary data. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'iptables/iptables.c')
-rw-r--r--iptables/iptables.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/iptables/iptables.c b/iptables/iptables.c
index 4ae75419..477e8f1d 100644
--- a/iptables/iptables.c
+++ b/iptables/iptables.c
@@ -1315,8 +1315,8 @@ static void command_jump(struct iptables_command_state *cs)
cs->target->t->u.target_size = size;
strcpy(cs->target->t->u.user.name, cs->jumpto);
cs->target->t->u.user.revision = cs->target->revision;
- if (cs->target->init != NULL)
- cs->target->init(cs->target->t);
+ xs_init_target(cs->target);
+
if (cs->target->x6_options != NULL)
opts = xtables_options_xfrm(iptables_globals.orig_opts, opts,
cs->target->x6_options,
@@ -1344,8 +1344,7 @@ static void command_match(struct iptables_command_state *cs)
m->m->u.match_size = size;
strcpy(m->m->u.user.name, m->name);
m->m->u.user.revision = m->revision;
- if (m->init != NULL)
- m->init(m->m);
+ xs_init_match(m);
if (m == m->next)
return;
/* Merge options for non-cloned matches */
@@ -1871,8 +1870,7 @@ int do_command4(int argc, char *argv[], char **table, struct iptc_handle **handl
strcpy(cs.target->t->u.user.name, cs.jumpto);
if (!iptc_is_chain(cs.jumpto, *handle))
cs.target->t->u.user.revision = cs.target->revision;
- if (cs.target->init != NULL)
- cs.target->init(cs.target->t);
+ xs_init_target(cs.target);
}
if (!cs.target) {