diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2011-10-27 10:24:49 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-10-28 21:26:12 +0200 |
commit | 8b5ac9630c20508f6fc64af451ac585871a44358 (patch) | |
tree | 9436978c6c2fd8ad879410d5de4bb164d5574936 /tools | |
parent | 439f75d004644cd4c80b2b5a66b67a9320a8dc27 (diff) | |
download | connman-8b5ac9630c20508f6fc64af451ac585871a44358.tar.gz connman-8b5ac9630c20508f6fc64af451ac585871a44358.tar.bz2 connman-8b5ac9630c20508f6fc64af451ac585871a44358.zip |
tools: Target and matches preparation function moves in iptables_test
Diffstat (limited to 'tools')
-rw-r--r-- | tools/iptables-test.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tools/iptables-test.c b/tools/iptables-test.c index 65519043..eb7a164e 100644 --- a/tools/iptables-test.c +++ b/tools/iptables-test.c @@ -1450,10 +1450,18 @@ int main(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': @@ -1559,16 +1567,6 @@ int main(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_rule == TRUE) { printf("Deleting %s to %s (match %s)\n", target_name, chain, match_name); |