summaryrefslogtreecommitdiffstats
path: root/communication.c
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2005-06-18 14:42:44 +0000
committerBart De Schuymer <bdschuym@pandora.be>2005-06-18 14:42:44 +0000
commit09a5ea5ab5c8c362e9d883e792a5a0f8abd1da20 (patch)
tree1156345c749c67d0dd9be55d7ac3d2801778b84b /communication.c
parent229079b1ff13b99db77ac2b73530f0d445c0aeba (diff)
bugfix
Diffstat (limited to 'communication.c')
-rw-r--r--communication.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/communication.c b/communication.c
index 6db6858..bfe9110 100644
--- a/communication.c
+++ b/communication.c
@@ -350,7 +350,9 @@ void ebt_deliver_counters(struct ebt_u_replace *u_repl, int exec_style)
new = newcounters;
while (cc) {
if (!next) {
- while (!(entries = ebt_nr_to_chain(u_repl, chainnr++)));
+ while (!(entries = ebt_nr_to_chain(u_repl, chainnr++)))
+ if (chainnr > NF_BR_NUMHOOKS)
+ goto letscontinue;/* Prevent infinite loop for -D x:-1 */
if (!(next = entries->entries))
continue;
}
@@ -397,6 +399,7 @@ void ebt_deliver_counters(struct ebt_u_replace *u_repl, int exec_style)
}
cc = cc->next;
}
+letscontinue:
free(u_repl->counters);
u_repl->counters = newcounters;