From 39fa4cc012b8f93dab78619beca17d4601e12631 Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Sun, 4 Aug 2013 23:01:33 -0400 Subject: [PATCH] [server] if iptables init fails then no need to remove fwknop chains This commit fixes a crash at init time in fwknopd if an improperly formatted IPT_INPUT_ACCESS variable is used in fwknopd.conf file. fwknopd should not try to delete chains with a bogus IPT_INPUT_ACCESS variable, and valgrind verifies that this change does not introduce any memory leaks (see the 'invalid iptables INPUT spec' tests run in --enable-valgrind mode). --- server/fwknopd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/fwknopd.c b/server/fwknopd.c index 67263050..06e84dc5 100644 --- a/server/fwknopd.c +++ b/server/fwknopd.c @@ -182,7 +182,7 @@ main(int argc, char **argv) * of an existing fwknopd process. */ if(fw_config_init(&opts) != 1) - clean_exit(&opts, FW_CLEANUP, EXIT_FAILURE); + clean_exit(&opts, NO_FW_CLEANUP, EXIT_FAILURE); if(opts.fw_list == 1 || opts.fw_list_all == 1) {