]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix references which pass through key attributes
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 26 Nov 2020 21:28:36 +0000 (14:28 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 26 Nov 2020 21:28:36 +0000 (14:28 -0700)
src/lib/server/tmpl_tokenize.c

index 7508b83f38a57259f5d54c28daaaded13097acf7..85103ddb37d4a8919a139c44f4a6e8028a79c864 100644 (file)
@@ -1638,6 +1638,7 @@ do_suffix:
                case FR_TYPE_TLV:
                case FR_TYPE_VENDOR:
                case FR_TYPE_VSA:
+               is_union:
                        /*
                         *      Omit nesting types where the relationship is already
                         *      described by the dictionaries and there's no filter.
@@ -1657,6 +1658,8 @@ do_suffix:
                        break;
 
                default:
+                       if (fr_dict_attr_is_key_field(da)) goto is_union;
+
                        fr_strerror_printf("Parent type of nested attribute %s must be of type "
                                           "\"struct\", \"tlv\", \"vendor\", \"vsa\" or \"group\", got \"%s\"",
                                           da->name,