diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2011-10-27 10:26:34 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-10-28 21:34:28 +0200 |
commit | e1a4156c5edeae0f75cd53e87a0482f785def9cb (patch) | |
tree | 095dd149b5b116346e4510258ae3f3960b79c21c /src | |
parent | 13ce482dae1d5063016ac349e1dc2013c2e510df (diff) | |
download | connman-e1a4156c5edeae0f75cd53e87a0482f785def9cb.tar.gz connman-e1a4156c5edeae0f75cd53e87a0482f785def9cb.tar.bz2 connman-e1a4156c5edeae0f75cd53e87a0482f785def9cb.zip |
iptables: Move target and matches preparation routines
Diffstat (limited to 'src')
-rw-r--r-- | src/iptables.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/iptables.c b/src/iptables.c index e1370c4c..e3129f66 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -1462,10 +1462,18 @@ static int iptables_command(int argc, char *argv[]) case 'j': target_name = optarg; + xt_t = prepare_target(table, target_name); + if (xt_t == NULL) + goto out; + break; case 'm': match_name = optarg; + xt_m = prepare_matches(table, &xt_rm, match_name); + if (xt_m == NULL) + goto out; + break; case 'o': @@ -1572,16 +1580,9 @@ static int iptables_command(int argc, char *argv[]) } if (chain) { - xt_t = prepare_target(table, target_name); if (xt_t == NULL) goto out; - if (match_name != NULL) { - xt_m = prepare_matches(table, &xt_rm, match_name); - if (xt_m == NULL) - goto out; - } - if (delete == TRUE) { DBG("Deleting %s to %s (match %s)\n", target_name, chain, match_name); |