mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-12 01:26:48 +08:00
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:
@@ -4,6 +4,7 @@
|
|||||||
- Enhanced the seccomp filters to address issue in testing (#627)
|
- Enhanced the seccomp filters to address issue in testing (#627)
|
||||||
- Fixed "unexpected URL" errors for Cisco AnyConnect clients
|
- Fixed "unexpected URL" errors for Cisco AnyConnect clients
|
||||||
- Fixed the 'ping-leases' option, which was broken since version 1.1.1
|
- 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)
|
* Version 1.3.0 (released 2024-05-05)
|
||||||
- Switch to https://github.com/nodejs/llhttp from http-parser.
|
- Switch to https://github.com/nodejs/llhttp from http-parser.
|
||||||
|
|||||||
+4
-4
@@ -561,15 +561,15 @@ static int iroutes_handler(void *_ctx, const char *section, const char *name,
|
|||||||
if (section != NULL && section[0] != 0) {
|
if (section != NULL && section[0] != 0) {
|
||||||
fprintf(stderr, WARNSTR "skipping unknown section '%s'\n",
|
fprintf(stderr, WARNSTR "skipping unknown section '%s'\n",
|
||||||
section);
|
section);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(name, "iroute") != 0)
|
if (strcmp(name, "iroute") != 0)
|
||||||
return 0;
|
return 1;
|
||||||
|
|
||||||
value = sanitize_config_value(ctx->config, _value);
|
value = sanitize_config_value(ctx->config, _value);
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
return 0;
|
return 1;
|
||||||
|
|
||||||
ret = _add_multi_line_val(ctx->config, &ctx->config->known_iroutes,
|
ret = _add_multi_line_val(ctx->config, &ctx->config->known_iroutes,
|
||||||
&ctx->config->known_iroutes_size, value);
|
&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);
|
talloc_free(value);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void append_iroutes_from_file(struct cfg_st *config, const char *file)
|
static void append_iroutes_from_file(struct cfg_st *config, const char *file)
|
||||||
|
|||||||
Reference in New Issue
Block a user