From 223d0970e00c0968b269c39d987e7b22afa4d633 Mon Sep 17 00:00:00 2001 From: Quentin Armitage Date: Mon, 1 Jul 2024 12:16:03 +0100 Subject: [PATCH 1/2] core: improve error message for process event listen Signed-off-by: Quentin Armitage --- keepalived/core/track_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keepalived/core/track_process.c b/keepalived/core/track_process.c index c4815654b5..76af36ae0c 100644 --- a/keepalived/core/track_process.c +++ b/keepalived/core/track_process.c @@ -817,7 +817,7 @@ static int set_proc_ev_listen(int nl_sd, bool enable) rc = send(nl_sd, &nlcn_msg, sizeof(nlcn_msg), 0); if (rc == -1) { - log_message(LOG_INFO, "Failed to set/clear process event listen - errno %d - %m", errno); + log_message(LOG_INFO, "Failed to %s process event listen - errno %d - %m", enable ? "set" : "clear", errno); return -1; } From 0b894f98e8491eefaa1821dbb73e138940cfb8d5 Mon Sep 17 00:00:00 2001 From: Quentin Armitage Date: Tue, 9 Jul 2024 11:18:02 +0100 Subject: [PATCH 2/2] all: Properly handle an include file name ending with '\' Signed-off-by: Quentin Armitage --- lib/parser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/parser.c b/lib/parser.c index e43fab117a..f34059fd83 100644 --- a/lib/parser.c +++ b/lib/parser.c @@ -1648,9 +1648,10 @@ have_brace(const char *conf_file) return false; do { - if (*p == '\\') - p++; - else if (*p == '{') + if (*p == '\\') { // Skip a '\' and following character + if (!*++p) // Ensure '\' not last character + return false; + } else if (*p == '{') return true; } while (*++p);