]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
protocol-specific extensions are variable sized
authorAlan T. DeKok <aland@freeradius.org>
Mon, 3 Jan 2022 19:20:34 +0000 (14:20 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 3 Jan 2022 21:26:02 +0000 (16:26 -0500)
and use a protocol-specific structure, which can't be shared
across multiple protocols

src/lib/util/dict_ext.c
src/lib/util/dict_ext.h

index aec85183aaa7c2c618971a2e89a051b6bbe4c680..f3c2444b30af84446076a2d11a49f23d3b549653 100644 (file)
@@ -197,8 +197,9 @@ fr_ext_t const fr_dict_attr_ext_def = {
                                                        .can_copy = false,      /* Same limitation as ext_children */
                                                },
                [FR_DICT_ATTR_EXT_PROTOCOL_SPECIFIC] = {
-                                                       .min = sizeof(fr_dict_ext_protocol_specific_t),
-                                                       .can_copy = true
+                                                       .min = FR_EXT_ALIGNMENT,  /* allow for one byte of protocol stuff */
+                                                       .has_hdr = true,        /* variable sized */
+                                                       .can_copy = false       /* only the protocol can copy it */
                                                },
                [FR_DICT_ATTR_EXT_MAX]          = {}
        }
index 64ae1b029b478d6507d0ef66a85fdfd79db7b194..7a84e31fa9f6457417ca03a548278edbbea352cb 100644 (file)
@@ -102,13 +102,6 @@ typedef struct {
        fr_dict_attr_t const    *union_ref;                     //!< The union da this value points into.
 } fr_dict_enum_ext_union_ref_t;
 
-/** Attribute extension - Protocol-specific
- *
- */
-typedef struct {
-       void                    *uctx;                          //!< Protocol specific extensions
-} fr_dict_ext_protocol_specific_t;
-
 /** @name Add extension structures to attributes
  *
  * @{