From 92edcb0cf517ddb7976e396eabc7a79f8a1016ba Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 12 Jun 2009 20:35:42 +0200 Subject: iptables: allow for parse-less extensions This means we can do some code removal in extensions. Signed-off-by: Jan Engelhardt --- iptables.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'iptables.c') diff --git a/iptables.c b/iptables.c index 7c075dac..cc175767 100644 --- a/iptables.c +++ b/iptables.c @@ -1727,13 +1727,14 @@ int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle exit_tryhelp(2); default: - if (!target - || !(target->parse(c - target->option_offset, + if (target == NULL || target->parse == NULL || + !target->parse(c - target->option_offset, argv, invert, &target->tflags, - &fw, &target->t))) { + &fw, &target->t)) { for (matchp = matches; matchp; matchp = matchp->next) { - if (matchp->completed) + if (matchp->completed || + matchp->match->parse == NULL) continue; if (matchp->match->parse(c - matchp->match->option_offset, argv, invert, -- cgit v1.2.3