From: Daniel Wagner <daniel.wag...@bmw-carit.de>

---
 src/iptables.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/iptables.c b/src/iptables.c
index df0a625..ace9798 100644
--- a/src/iptables.c
+++ b/src/iptables.c
@@ -2325,6 +2325,14 @@ void flush_table(const char *name)
                        table->blob_entries->size,
                        flush_table_cb, &chains);
 
+
+       /*
+        * The offset update code is fragile and it works
+        * only safe if we remove elements and move forwards
+        * in the table.
+        */
+       chains = g_slist_reverse(chains);
+
        for (list = chains; list != NULL; list = list->next) {
                char *chain = list->data;
 
-- 
1.8.1.3.566.gaa39828

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to