diff options
Diffstat (limited to 'src/conftest')
-rw-r--r-- | src/conftest/Makefile.in | 2 | ||||
-rw-r--r-- | src/conftest/config.c | 21 |
2 files changed, 16 insertions, 7 deletions
diff --git a/src/conftest/Makefile.in b/src/conftest/Makefile.in index 14b8351cd..c7d4c6bbe 100644 --- a/src/conftest/Makefile.in +++ b/src/conftest/Makefile.in @@ -342,6 +342,7 @@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ fips_mode = @fips_mode@ +fuzz_plugins = @fuzz_plugins@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ host = @host@ @@ -364,6 +365,7 @@ json_CFLAGS = @json_CFLAGS@ json_LIBS = @json_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ +libfuzzer = @libfuzzer@ libiptc_CFLAGS = @libiptc_CFLAGS@ libiptc_LIBS = @libiptc_LIBS@ linux_headers = @linux_headers@ diff --git a/src/conftest/config.c b/src/conftest/config.c index 06a685047..d926dfca2 100644 --- a/src/conftest/config.c +++ b/src/conftest/config.c @@ -36,13 +36,20 @@ struct private_config_t { linked_list_t *configs; }; -/** - * filter function for ike configs - */ -static bool ike_filter(void *data, peer_cfg_t **in, ike_cfg_t **out) +CALLBACK(ike_filter, bool, + void *data, enumerator_t *orig, va_list args) { - *out = (*in)->get_ike_cfg(*in); - return TRUE; + peer_cfg_t *cfg; + ike_cfg_t **out; + + VA_ARGS_VGET(args, out); + + if (orig->enumerate(orig, &cfg)) + { + *out = cfg->get_ike_cfg(cfg); + return TRUE; + } + return FALSE; } METHOD(backend_t, create_ike_cfg_enumerator, enumerator_t*, @@ -51,7 +58,7 @@ METHOD(backend_t, create_ike_cfg_enumerator, enumerator_t*, return enumerator_create_filter( this->configs->create_enumerator(this->configs), - (void*)ike_filter, NULL, NULL); + ike_filter, NULL, NULL); } METHOD(backend_t, create_peer_cfg_enumerator, enumerator_t*, |