projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0a1ddb3
)
tools: Initiate defined table before working on it in iptables-test
author
Tomasz Bursztyka
<tomasz.bursztyka@linux.intel.com>
Thu, 10 Nov 2011 09:02:22 +0000
(11:02 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 14 Nov 2011 15:43:44 +0000
(16:43 +0100)
tools/iptables-test.c
patch
|
blob
|
history
diff --git
a/tools/iptables-test.c
b/tools/iptables-test.c
index
3bbe43b
..
b3f1ce1
100644
(file)
--- a/
tools/iptables-test.c
+++ b/
tools/iptables-test.c
@@
-1561,6
+1561,11
@@
int main(int argc, char *argv[])
case 't':
table_name = optarg;
case 't':
table_name = optarg;
+
+ table = connman_iptables_init(table_name);
+ if (table == NULL)
+ return -1;
+
break;
case 1:
break;
case 1:
@@
-1653,12
+1658,13
@@
int main(int argc, char *argv[])
xt_t->final_check(xt_t->tflags);
#endif
xt_t->final_check(xt_t->tflags);
#endif
- if (table
_name == NULL)
+ if (table
== NULL) {
table_name = "filter";
table_name = "filter";
- table = connman_iptables_init(table_name);
- if (table == NULL)
- return -1;
+ table = connman_iptables_init(table_name);
+ if (table == NULL)
+ return -1;
+ }
if (delete) {
if (delete_chain == NULL)
if (delete) {
if (delete_chain == NULL)