netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [conntrack-tools PATCH 1/4] conntrackd: evaluate configuration earlier
@ 2017-06-06 10:58 Arturo Borrero Gonzalez
  2017-06-06 10:58 ` [conntrack-tools PATCH 2/4] conntrackd: make the daemon run in RT mode by default Arturo Borrero Gonzalez
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Arturo Borrero Gonzalez @ 2017-06-06 10:58 UTC (permalink / raw)
  To: netfilter-devel

Run the evaluation step sooner in the conntrackd startup routine.
Don't close log or unlink lockfile at this stage.

Signed-off-by: Arturo Borrero Gonzalez <arturo@debian.org>
---
 src/main.c |   20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/main.c b/src/main.c
index fb20f1d..4b6d17d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -338,6 +338,15 @@ int main(int argc, char *argv[])
 		exit(EXIT_FAILURE);
 	}
 
+	/*
+	 * Evaluate configuration
+	 */
+	if (evaluate() == -1) {
+		dlog(LOG_ERR, "conntrackd cannot start, please review your "
+		     "configuration");
+		exit(EXIT_FAILURE);
+	}
+
 	if (type == REQUEST) {
 		if (do_local_request(action, &conf.local, local_step) == -1) {
 			dlog(LOG_ERR, "can't connect: is conntrackd "
@@ -383,17 +392,6 @@ int main(int argc, char *argv[])
 	}
 
 	/*
-	 * Evaluate configuration
-	 */
-	if (evaluate() == -1) {
-		dlog(LOG_ERR, "conntrackd cannot start, please review your "
-		     "configuration");
-		close_log();
-		unlink(CONFIG(lockfile));
-		exit(EXIT_FAILURE);
-	}
-
-	/*
 	 * initialization process
 	 */
 


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-06-12  8:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-06 10:58 [conntrack-tools PATCH 1/4] conntrackd: evaluate configuration earlier Arturo Borrero Gonzalez
2017-06-06 10:58 ` [conntrack-tools PATCH 2/4] conntrackd: make the daemon run in RT mode by default Arturo Borrero Gonzalez
2017-06-06 11:10   ` Pablo Neira Ayuso
2017-06-07 20:53     ` Arturo Borrero Gonzalez
2017-06-12  8:15       ` Pablo Neira Ayuso
2017-06-06 10:58 ` [conntrack-tools PATCH 3/4] conntrackd: cleanup if failed forking Arturo Borrero Gonzalez
2017-06-06 16:11   ` Pablo Neira Ayuso
2017-06-06 10:58 ` [conntrack-tools PATCH 4/4] conntrackd: deprecate unix backlog configuration Arturo Borrero Gonzalez
2017-06-06 11:11   ` Pablo Neira Ayuso
2017-06-06 11:21     ` Pablo Neira Ayuso
2017-06-06 16:13   ` Pablo Neira Ayuso
2017-06-06 16:11 ` [conntrack-tools PATCH 1/4] conntrackd: evaluate configuration earlier Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).