diff --git a/server/fwknopd.c b/server/fwknopd.c index 86813c0c..64f6ca56 100644 --- a/server/fwknopd.c +++ b/server/fwknopd.c @@ -128,6 +128,12 @@ main(int argc, char **argv) if(!opts.afl_fuzzing && ! check_dir_path((const char *)opts.config[CONF_FWKNOP_RUN_DIR], "Run", 0)) clean_exit(&opts, NO_FW_CLEANUP, EXIT_FAILURE); + /* Initialize our signal handlers. You can check the return value for + * the number of signals that were *not* set. Those that were not set + * will be listed in the log/stderr output. + */ + if(set_sig_handlers() > 0) + log_msg(LOG_ERR, "Errors encountered when setting signal handlers."); /* Initialize the firewall rules handler based on the fwknopd.conf * file, but (for iptables firewalls) don't flush any rules or create diff --git a/server/nfq_capture.c b/server/nfq_capture.c index 8e95c3ca..3b72e89a 100644 --- a/server/nfq_capture.c +++ b/server/nfq_capture.c @@ -165,13 +165,6 @@ nfq_capture(fko_srv_options_t *opts) exit(EXIT_FAILURE); } - /* Initialize our signal handlers. You can check the return value for - * the number of signals that were *not* set. Those that were not set - * will be listed in the log/stderr output. - */ - if(set_sig_handlers() > 0) - log_msg(LOG_ERR, "Errors encountered when setting signal handlers."); - log_msg(LOG_INFO, "Starting fwknopd main event loop."); /* Jump into our home-grown packet cature loop. diff --git a/server/pcap_capture.c b/server/pcap_capture.c index e2199025..e25904b5 100644 --- a/server/pcap_capture.c +++ b/server/pcap_capture.c @@ -183,13 +183,6 @@ pcap_capture(fko_srv_options_t *opts) clean_exit(opts, FW_CLEANUP, EXIT_FAILURE); } - /* Initialize our signal handlers. You can check the return value for - * the number of signals that were *not* set. Those that were not set - * will be listed in the log/stderr output. - */ - if(set_sig_handlers() > 0) - log_msg(LOG_ERR, "Errors encountered when setting signal handlers."); - log_msg(LOG_INFO, "Starting fwknopd main event loop."); /* Jump into our home-grown packet cature loop. diff --git a/server/udp_server.c b/server/udp_server.c index c89185c0..d5e837fe 100644 --- a/server/udp_server.c +++ b/server/udp_server.c @@ -109,13 +109,6 @@ run_udp_server(fko_srv_options_t *opts) return -1; } - /* Initialize our signal handlers. You can check the return value for - * the number of signals that were *not* set. Those that were not set - * will be listed in the log/stderr output. - */ - if(set_sig_handlers() > 0) - log_msg(LOG_ERR, "Errors encountered when setting signal handlers."); - FD_ZERO(&sfd_set); /* Now loop and receive SPA packets