summaryrefslogtreecommitdiffstats
path: root/userspace/ebtables2
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
commitb184c3899addc874eb4b7b46e59f1408cb6fb3e0 (patch)
tree835814c985e5046b015f6e9e8b76fc0bc724add6 /userspace/ebtables2
parent30d193d0876438964d8146a3b474793d3177d50d (diff)
--atomic-save copies counters too
Diffstat (limited to 'userspace/ebtables2')
-rw-r--r--userspace/ebtables2/ebtables.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/userspace/ebtables2/ebtables.c b/userspace/ebtables2/ebtables.c
index 5645978..e5d1035 100644
--- a/userspace/ebtables2/ebtables.c
+++ b/userspace/ebtables2/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