Fix iroute option processing

Return proper values (1 for success, 0 for error) from iroutes_handler()
to prevent premature parser termination

Signed-off-by: Grigory Trenin <grigory.trenin@gmail.com>
This commit is contained in:
Grigory Trenin
2025-11-24 12:42:35 -05:00
parent 5ff994633c
commit 4dcf3aa524
2 changed files with 5 additions and 4 deletions

1
NEWS
View File

@@ -4,6 +4,7 @@
- Enhanced the seccomp filters to address issue in testing (#627)
- Fixed "unexpected URL" errors for Cisco AnyConnect clients
- Fixed the 'ping-leases' option, which was broken since version 1.1.1
- Fixed 'iroute' option processing to handle multiple routes (#625)
* Version 1.3.0 (released 2024-05-05)
- Switch to https://github.com/nodejs/llhttp from http-parser.

View File

@@ -561,15 +561,15 @@ static int iroutes_handler(void *_ctx, const char *section, const char *name,
if (section != NULL && section[0] != 0) {
fprintf(stderr, WARNSTR "skipping unknown section '%s'\n",
section);
return 0;
return 1;
}
if (strcmp(name, "iroute") != 0)
return 0;
return 1;
value = sanitize_config_value(ctx->config, _value);
if (value == NULL)
return 0;
return 1;
ret = _add_multi_line_val(ctx->config, &ctx->config->known_iroutes,
&ctx->config->known_iroutes_size, value);
@@ -579,7 +579,7 @@ static int iroutes_handler(void *_ctx, const char *section, const char *name,
}
talloc_free(value);
return 0;
return 1;
}
static void append_iroutes_from_file(struct cfg_st *config, const char *file)