summaryrefslogtreecommitdiff
path: root/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
commitd1c9cec0a7fdcd9204be7daa8c4a7acc044b9e8f (patch)
tree80957235212117631396d0c3552cba547daea658 /ebtablesd.c
parent909146d201b113f7339ca10bddf8629887a2e9da (diff)
downloadebtables-d1c9cec0a7fdcd9204be7daa8c4a7acc044b9e8f.tar.gz
ebtables-d1c9cec0a7fdcd9204be7daa8c4a7acc044b9e8f.tar.bz2
ebtables-d1c9cec0a7fdcd9204be7daa8c4a7acc044b9e8f.zip
reinit table names after free
Diffstat (limited to 'ebtablesd.c')
-rw-r--r--ebtablesd.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ebtablesd.c b/ebtablesd.c
index 6683611..24d9e6a 100644
--- a/ebtablesd.c
+++ b/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")) {