diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2005-01-23 19:19:00 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2005-01-23 19:19:00 +0000 |
commit | d2ced8273cf812ca2ac61f407e6992e63bc1821d (patch) | |
tree | 52adeaada4167ad2f05425f9c2f8160090a30f7d /ebtables.c | |
parent | b92edb805ca4bab30caa526a3beb3f4d14f258a0 (diff) | |
download | ebtables-d2ced8273cf812ca2ac61f407e6992e63bc1821d.tar.gz |
add new counter scheme
Diffstat (limited to 'ebtables.c')
-rw-r--r-- | ebtables.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -300,8 +300,8 @@ static void list_em(struct ebt_u_entries *entries) t->print(hlp, hlp->t); if (replace->flags & LIST_C) printf(", pcnt = %llu -- bcnt = %llu", - replace->counters[entries->counter_offset + i].pcnt, - replace->counters[entries->counter_offset + i].bcnt); + hlp->cnt.pcnt, + hlp->cnt.bcnt); printf("\n"); hlp = hlp->next; } @@ -366,7 +366,6 @@ ATOMIC_ENV_VARIABLE " : if set <FILE> (see above) will equal its value" printf("\n"); if (table->help) table->help(ebt_hooknames); - exit(0); } /* Execute command L */ @@ -659,7 +658,7 @@ print_zero: i = -1; if (optind < argc && argv[optind][0] != '-') { if ((i = ebt_get_chainnr(replace, argv[optind])) == -1) - ebt_print_error2("Bad chain"); + ebt_print_error2("Chain %s doesn't exist", argv[optind]); optind++; } if (i != -1) { @@ -1020,8 +1019,11 @@ check_extension: if (!(table = ebt_find_table(replace->name))) ebt_print_error2("Bad table name"); - if (replace->command == 'h' && !(replace->flags & OPT_ZERO)) + if (replace->command == 'h' && !(replace->flags & OPT_ZERO)) { print_help(); + if (exec_style == EXEC_STYLE_PRG) + exit(0); + } /* Do the final checks */ if (replace->command == 'A' || replace->command == 'I' || |