From: Alan T. DeKok Date: Mon, 3 Jan 2022 19:20:34 +0000 (-0500) Subject: protocol-specific extensions are variable sized X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b05898f5c0a77fb1f8957a316f87d5bb4f5779f8;p=thirdparty%2Ffreeradius-server.git protocol-specific extensions are variable sized and use a protocol-specific structure, which can't be shared across multiple protocols --- diff --git a/src/lib/util/dict_ext.c b/src/lib/util/dict_ext.c index aec85183aa..f3c2444b30 100644 --- a/src/lib/util/dict_ext.c +++ b/src/lib/util/dict_ext.c @@ -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] = {} } diff --git a/src/lib/util/dict_ext.h b/src/lib/util/dict_ext.h index 64ae1b029b..7a84e31fa9 100644 --- a/src/lib/util/dict_ext.h +++ b/src/lib/util/dict_ext.h @@ -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 * * @{