From 482fbafe27ee88899c54417d89633ddc01ece1df Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Sun, 28 Aug 2005 13:16:25 +0000 Subject: put reference to cc in each entry --- ebtables.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'ebtables.c') diff --git a/ebtables.c b/ebtables.c index 717c66b..dc04f4e 100644 --- a/ebtables.c +++ b/ebtables.c @@ -182,7 +182,7 @@ static void print_iface(const char *iface) #define LIST_MAC2 0x20 /* Helper function for list_rules() */ -static void list_em(struct ebt_u_entries *entries, struct ebt_cntchanges *cc) +static void list_em(struct ebt_u_entries *entries) { int i, j, space = 0, digits; struct ebt_u_entry *hlp; @@ -320,13 +320,6 @@ static void list_em(struct ebt_u_entries *entries, struct ebt_cntchanges *cc) uint64_t pcnt = hlp->cnt.pcnt; uint64_t bcnt = hlp->cnt.bcnt; -#ifdef EBT_DEBUG - while (cc->type == CNT_DEL) - cc = cc->next; - if (cc->change != 0) /* In daemon mode, only change==0 is allowed */ - ebt_print_bug("cc->change != 0"); - cc = cc->next; -#endif if (replace->flags & LIST_X) printf("-c %llu %llu", pcnt, bcnt); else @@ -406,12 +399,11 @@ ATOMIC_ENV_VARIABLE " : if set (see above) will equal its value" static void list_rules() { int i; - struct ebt_cntchanges *cc = replace->counterchanges; if (!(replace->flags & LIST_X)) printf("Bridge table: %s\n", table->name); if (replace->selected_chain != -1) - list_em(ebt_to_chain(replace), cc); + list_em(ebt_to_chain(replace)); else { /* Create new chains and rename standard chains when necessary */ if (replace->flags & LIST_X && replace->num_chains > NF_BR_NUMHOOKS) { @@ -423,7 +415,7 @@ static void list_rules() } for (i = 0; i < replace->num_chains; i++) if (replace->chains[i]) - list_em(replace->chains[i], cc); + list_em(replace->chains[i]); } } @@ -1215,7 +1207,7 @@ delete_the_rule: if (exec_style == EXEC_STYLE_PRG) {/* Implies ebt_errormsg[0] == '\0' */ ebt_deliver_table(replace); - if (replace->counterchanges) + if (replace->cc) ebt_deliver_counters(replace, EXEC_STYLE_PRG); } return 0; -- cgit v1.2.1