summaryrefslogtreecommitdiffstats
path: root/userspace/ebtables2/ebtablesd.c
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2005-01-24 21:09:59 +0000
committerBart De Schuymer <bdschuym@pandora.be>2005-01-24 21:09:59 +0000
commita8cbb039d625f56534c08fb1a8704e8ae97d404c (patch)
tree4a56431454c11c7024244e126a3f057c82f73edf /userspace/ebtables2/ebtablesd.c
parentc228e74e1bbe26598e07edbf83dd9594a17e9264 (diff)
reinit table names after free
Diffstat (limited to 'userspace/ebtables2/ebtablesd.c')
-rw-r--r--userspace/ebtables2/ebtablesd.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/userspace/ebtables2/ebtablesd.c b/userspace/ebtables2/ebtablesd.c
index 6683611..24d9e6a 100644
--- a/userspace/ebtables2/ebtablesd.c
+++ b/userspace/ebtables2/ebtablesd.c
@@ -40,6 +40,12 @@ void ebt_early_init_once();
static void sigpipe_handler(int sig)
{
}
+static void copy_table_names()
+{
+ strcpy(replace[0].name, "filter");
+ strcpy(replace[1].name, "nat");
+ strcpy(replace[2].name, "broute");
+}
int main(int argc_, char *argv_[])
{
@@ -86,10 +92,7 @@ int main(int argc_, char *argv_[])
ebt_silent = 1;
- strcpy(replace[0].name, "filter");
- strcpy(replace[1].name, "nat");
- strcpy(replace[2].name, "broute");
-
+ copy_table_names();
ebt_early_init_once();
while (!stop) {
@@ -193,6 +196,7 @@ continue_read:
goto write_msg;
}
ebt_cleanup_replace(&replace[i]);
+ copy_table_names();
replace[i].flags &= ~OPT_KERNELDATA;
goto write_msg;
} else if (!strcmp(argv[1], "open")) {