summaryrefslogtreecommitdiffstats
path: root/ebtables.c
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2002-07-16 18:08:36 +0000
committerBart De Schuymer <bdschuym@pandora.be>2002-07-16 18:08:36 +0000
commit5f16dc7831a9f9ce833897a1570a692eede70651 (patch)
treed0da40946719312c1e1c59e39bb193e420bbe520 /ebtables.c
parente8890ff690de7b530c589032acce7646f4913148 (diff)
--atomic-save copies counters too
Diffstat (limited to 'ebtables.c')
-rw-r--r--ebtables.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ebtables.c b/ebtables.c
index 5645978..e5d1035 100644
--- a/ebtables.c
+++ b/ebtables.c
@@ -2127,7 +2127,13 @@ int main(int argc, char *argv[])
print_error("can't initialize ebtables "
"table %s", replace.name);
}
- replace.num_counters = 0;
+ if (c == 10 && 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;
+ }
if (c == 11)
break;
case 9 : // atomic