diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2002-07-16 18:14:20 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2002-07-16 18:14:20 +0000 |
commit | 1947e88b29861baa80852b535ebe9da9b8849019 (patch) | |
tree | 0051405e9bc8d7a461b120e5112ffa7922f887e6 /userspace/ebtables2/ebtables.c | |
parent | b184c3899addc874eb4b7b46e59f1408cb6fb3e0 (diff) |
--atomic-commit copies counters
Diffstat (limited to 'userspace/ebtables2/ebtables.c')
-rw-r--r-- | userspace/ebtables2/ebtables.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/userspace/ebtables2/ebtables.c b/userspace/ebtables2/ebtables.c index e5d1035..7d41e1c 100644 --- a/userspace/ebtables2/ebtables.c +++ b/userspace/ebtables2/ebtables.c @@ -2108,7 +2108,13 @@ int main(int argc, char *argv[]) strcpy(replace.filename, optarg); // get the information from the file get_table(&replace); - replace.num_counters = 0; + if (replace.nentries) { + counterchanges = (unsigned short *) + malloc(sizeof(unsigned short) * (replace.nentries + 1)); + for (i = 0; i < replace.nentries; i++) + counterchanges[i] = CNT_NORM; + counterchanges[i] = CNT_END; + } free(replace.filename); replace.filename = NULL; break; |