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) {