Skip to content

Commit

Permalink
fix: When using a dictionary that first defines a protocol with "PROT…
Browse files Browse the repository at this point in the history
…OCOL" the dctx stack da is updated, but not the filename, causing it to be lost as the stack grows, since all future items on the stack inherit the filename. Fixed by also setting the filename when updating the da.

Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
  • Loading branch information
ethan-thompson authored and alandekok committed Dec 18, 2024
1 parent 10a2d7d commit 7cb91d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/util/dict_tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ static int CC_HINT(nonnull)
dict_dctx_push_or_update(dict_tokenize_ctx_t *dctx, fr_dict_attr_t const *da, dict_nest_t nest)
{
if (dctx->stack[++dctx->stack_depth].nest == nest) {
dctx->stack[dctx->stack_depth].filename = dctx->stack[dctx->stack_depth - 1].filename;
dctx->stack[dctx->stack_depth].da = da;
return 0;
}
Expand Down

0 comments on commit 7cb91d3

Please sign in to comment.