summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2011-09-22 12:39:28 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2011-09-22 13:22:47 (GMT)
commit5649904ce39fbe14d9160b616ba4a97cbbae5e6f (patch)
treef25153628d769c06339a5029d99f0222d60f92c0 /tools
parent6058f45ed32397e55739cdbdcc77159b579c1568 (diff)
downloadconnman-5649904ce39fbe14d9160b616ba4a97cbbae5e6f.zip
connman-5649904ce39fbe14d9160b616ba4a97cbbae5e6f.tar.gz
connman-5649904ce39fbe14d9160b616ba4a97cbbae5e6f.tar.bz2
tools: Fixing target reference update in iptables-test
Diffstat (limited to 'tools')
-rw-r--r--tools/iptables-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/iptables-test.c b/tools/iptables-test.c
index d41bbf0..f3481bb 100644
--- a/tools/iptables-test.c
+++ b/tools/iptables-test.c
@@ -309,10 +309,10 @@ static int connman_add_entry(struct connman_iptables *table,
entry_before = before->data;
/*
- * We've just insterted a new entry. All references before it
+ * We've just appended/insterted a new entry. All references
* should be bumped accordingly.
*/
- for (list = table->entries; list != before; list = list->next) {
+ for (list = table->entries; list; list = list->next) {
tmp = list->data;
if (!is_jump(tmp))
@@ -320,7 +320,7 @@ static int connman_add_entry(struct connman_iptables *table,
t = (struct xt_standard_target *)ipt_get_target(tmp->entry);
- if (t->verdict >= entry_before->offset)
+ if (t->verdict > entry_before->offset)
t->verdict += entry->next_offset;
}