]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
add and use "has_fixup" flag.
authorAlan T. DeKok <aland@freeradius.org>
Sun, 23 Feb 2025 10:46:51 +0000 (05:46 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 23 Feb 2025 11:32:52 +0000 (06:32 -0500)
commit4236e0185a1130b777d4616948b357a50c8b0ea0
tree0e7ff56d54a4e8a79e153acaca62aaf0bfd7749b
parented539c624cee5dd6a86f5a9136af8264213d9512
add and use "has_fixup" flag.

When we copy an attribute, we need to check if it has pending
fixups.  If so, we can't copy it.  This gives the admin a
descriptive error, rather than having something go wrong later.

This situation happens when we're cloning an attribute that has
children, and those children have fixups.

A more in-depth fix would be to move the fixup lists to the
fr_dict_t.  The cloned attribute could then add itself to a
separate "clone after fixups" list.  So the clone could be applied
last, after all of the fixups have been applied.

Part of the fix is checking for pending fixups and complaining.
More of the fix is setting "ref=..." immediately, if it can be
resolved.  That way we avoid many pending fixups.
src/lib/util/dict.h
src/lib/util/dict_fixup.c
src/lib/util/dict_tokenize.c
src/lib/util/dict_util.c