From 94b64b706592e134aa8b63a125f9ab4bbfe7b773 Mon Sep 17 00:00:00 2001 From: Donald Yandt Date: Sat, 2 Mar 2024 11:08:02 -0500 Subject: [PATCH] conntrackd: exit with failure status If no configuration file or an invalid parameter is provided, the daemon should exit with a failure status. Signed-off-by: Donald Yandt Signed-off-by: Pablo Neira Ayuso (cherry picked from commit 805a355fbc85aea237b940518ac806362aa4ecec) --- src/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index de4773df8a204..c6b26002e9fa4 100644 --- a/src/main.c +++ b/src/main.c @@ -175,7 +175,7 @@ int main(int argc, char *argv[]) } show_usage(argv[0]); dlog(LOG_ERR, "Missing config filename"); - break; + exit(EXIT_FAILURE); case 'F': set_operation_mode(&type, REQUEST, argv); i = set_action_by_table(i, argc, argv, @@ -309,8 +309,7 @@ int main(int argc, char *argv[]) default: show_usage(argv[0]); dlog(LOG_ERR, "Unknown option: %s", argv[i]); - return 0; - break; + exit(EXIT_FAILURE); } }