Fix issue #39, configure interfaces after daemonization, as otherwise we

loose the ALLMULTI flag on the listening interfaces during the whole process.
Probable cause is the parent restoring the original state of the interface
flags before exitting.
This commit is contained in:
root 2018-10-20 10:53:29 +02:00
parent eb81b8f2d6
commit 13473e5259

View File

@ -351,9 +351,6 @@ int main(int argc, char* argv[], char* env[])
if (cf.is_null())
return -1;
if (!configure(cf))
return -1;
if (daemon) {
logger::syslog(true);
@ -361,6 +358,9 @@ int main(int argc, char* argv[], char* env[])
return 1;
}
if (!configure(cf))
return -1;
if (!pidfile.empty()) {
std::ofstream pf;
pf.open(pidfile.c_str(), std::ios::out | std::ios::trunc);