config: fix allow_all parsing — accept yes/1/true like other bool options

- config_parser.c: allowed_keys_allow_all now uses strcasecmp(yes/1/true) instead of atoi()
- node_config.cpp: keep allow_all=yes
This commit is contained in:
Evgeny committed 2026-07-15 18:01:54 +03:00
1 parent 1eb54b722a
commit fc9aa79e20
1 file changed
+1 -1
+1 -1
View File
@@ -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) {