From d0af503d012f812d0e17f971ef7d80d5961b81cc Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 15 Jul 2026 18:01:54 +0300 Subject: [PATCH] =?UTF-8?q?config:=20fix=20allow=5Fall=20parsing=20?= =?UTF-8?q?=E2=80=94=20accept=20yes/1/true=20like=20other=20bool=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - config_parser.c: allowed_keys_allow_all now uses strcasecmp(yes/1/true) instead of atoi() - node_config.cpp: keep allow_all=yes --- src/config_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config_parser.c b/src/config_parser.c index e79427db..0b53c590 100644 --- a/src/config_parser.c +++ b/src/config_parser.c @@ -931,7 +931,7 @@ static struct utun_config* parse_config_internal(FILE *fp, const char *filename) break; case SECTION_ALLOWED_KEYS: if (strcmp(key, "allow_all") == 0) { - cfg->global.allowed_keys_allow_all = atoi(value) ? 1 : 0; + cfg->global.allowed_keys_allow_all = strcasecmp(value, "yes") == 0 || strcasecmp(value, "1") == 0 || strcasecmp(value, "true") == 0; } else if (strcmp(key, "key") == 0) { struct CFG_ALLOWED_KEY *new_key = u_calloc(1, sizeof(struct CFG_ALLOWED_KEY)); if (!new_key) {