Skip to content

Commit

Permalink
debug: add/move some debug output lines
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarning committed Jul 28, 2019
1 parent cdb941d commit 963e3f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/fw_iptables.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ iptables_fw_init(void)
int rc = 0;
int macmechanism;

debug(LOG_NOTICE, "Initializing firewall rules");

LOCK_CONFIG();
config = config_get_config();
gw_interface = safe_strdup(config->gw_interface); /* must free */
Expand Down Expand Up @@ -794,7 +796,7 @@ iptables_fw_destroy_mention(
char rulenum[10];
int retval = -1;

debug(LOG_DEBUG, "Checking all mention of %s from %s.%s", mention, table, chain);
debug(LOG_DEBUG, "Checking all mention of %s in table %s of chain %s", mention, table, chain);

config = config_get_config();
iptables = config->ip6 ? "ip6tables" : "iptables";
Expand Down
3 changes: 1 addition & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ init_signals(void)
exit(1);
}

debug(LOG_DEBUG, "Setting SIGTERM,SIGQUIT,SIGINT handlers to termination_handler()");
debug(LOG_DEBUG, "Setting SIGTERM, SIGQUIT, SIGINT handlers to termination_handler()");
sa.sa_handler = termination_handler;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
Expand Down Expand Up @@ -368,7 +368,6 @@ main_loop(void)
iptables_fw_destroy();

/* Then initialize it */
debug(LOG_NOTICE, "Initializing firewall rules");
if (iptables_fw_init() != 0) {
debug(LOG_ERR, "Error initializing firewall rules! Cleaning up");
iptables_fw_destroy();
Expand Down

0 comments on commit 963e3f0

Please sign in to comment.