]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: add filename and linenum for ssl-f-use errors
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 6 May 2025 18:13:15 +0000 (20:13 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 6 May 2025 19:36:29 +0000 (21:36 +0200)
Fill cfg_crt_node with a filename and linenum so the post_section
callback can use it to emit errors.

This way the errors are emitted with the right filename and linenum
where ssl-f-use is used instead of (null):0

src/cfgparse-ssl.c

index b78014872228341b91edb74cc6672fe315b5261d..d5b49956303e7d01a53294b439505f443aafdb9e 100644 (file)
@@ -2186,6 +2186,13 @@ static int proxy_parse_ssl_f_use(char **args, int section_type, struct proxy *cu
                memprintf(err, "not enough memory!");
                goto error;
        }
+       cfg_crt_node->filename = strdup(file);
+       if (!cfg_crt_node->filename) {
+               memprintf(err, "not enough memory!");
+               goto error;
+       }
+       cfg_crt_node->linenum = linenum;
+
 
        ckch_conf = calloc(1, sizeof *ckch_conf);
        if (!ckch_conf) {