diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2005-06-18 14:42:44 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2005-06-18 14:42:44 +0000 |
commit | 1c31bdd581376e5b0a1c9158aa9c31131581227f (patch) | |
tree | 9bb12e565e87dd42704b7438675c32d366615af8 /userspace/ebtables2/communication.c | |
parent | 8e2fbde29fa2ef6f5463842aafbb96293a59d596 (diff) |
bugfix
Diffstat (limited to 'userspace/ebtables2/communication.c')
-rw-r--r-- | userspace/ebtables2/communication.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/userspace/ebtables2/communication.c b/userspace/ebtables2/communication.c index 6db6858..bfe9110 100644 --- a/userspace/ebtables2/communication.c +++ b/userspace/ebtables2/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; |