diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/iptables.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/iptables.c b/src/iptables.c index 9e56d0bb..3ae84178 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -2310,6 +2310,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; |