]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
it helps to set enumv in the value box.
authorAlan T. DeKok <aland@freeradius.org>
Sun, 26 Jan 2025 21:19:14 +0000 (16:19 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 26 Jan 2025 21:20:09 +0000 (16:20 -0500)
so that when the value is printed, it's printed as the name.

This wasn't needed before, because almost all of the tmpls were
unresolved data, and any printing used the tmpl name.

src/lib/server/tmpl_tokenize.c

index 1e9256788ab1fb652c7ea98f5d5396a9f70932e8..630ec3b92f5cbe34246d32c284d6aced6a279734 100644 (file)
@@ -3159,6 +3159,7 @@ static ssize_t tmpl_afrom_enum(TALLOC_CTX *ctx, tmpl_t **out, fr_sbuff_t *in,
                        tmpl_init(vpt, TMPL_TYPE_DATA, T_BARE_WORD,
                                  fr_sbuff_start(&our_in), fr_sbuff_used(&our_in), t_rules);
                        (void) fr_value_box_copy(vpt, &vpt->data.literal, dv->value);
+                       vpt->data.literal.enumv = t_rules->enumv;
 
                        *out = vpt;
                        FR_SBUFF_SET_RETURN(in, &our_in);