]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Correct locating of fr_tls_conf_t when parsing cache mode
authorNick Porter <nick@portercomputing.co.uk>
Thu, 22 Jun 2023 13:15:35 +0000 (14:15 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 22 Jun 2023 13:15:35 +0000 (14:15 +0100)
`parent` is the fr_tls_cache_conf_t being populated, which is a member
of the fr_tls_conf_t.

src/lib/tls/conf.c

index d16da1baa63a406da726fae67634508c087f78b8..16637fbde3784248afbd6bd9f9bb1a8e5a9fb2bd 100644 (file)
@@ -242,7 +242,7 @@ CONF_PARSER fr_tls_client_config[] = {
 
 static int tls_conf_parse_cache_mode(TALLOC_CTX *ctx, void *out, void *parent, CONF_ITEM *ci, CONF_PARSER const *rule)
 {
-       fr_tls_conf_t   *conf = talloc_get_type_abort(parent, fr_tls_conf_t);
+       fr_tls_conf_t   *conf = talloc_get_type_abort((uint8_t *)parent - offsetof(fr_tls_conf_t, cache), fr_tls_conf_t);
        int             cache_mode;
 
        if (cf_table_parse_int(ctx, &cache_mode, parent, ci, rule) < 0) return -1;